Advertisement
LittleAngel

Ref issue

Aug 8th, 2011
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. List <VectorLine> lines;
  2.  
  3. VectorLine line= new VectorLine ("Line", new Vector2[12], null, 1.0f);
  4. lines.Add (line);
  5.  
  6.  
  7. foreach (VectorLine line in lines) {
  8. Vector.DestroyLine (ref line);
  9. }
  10.  
  11.  
  12. error:
  13. Assets/MyScripts/MyLineMaker.cs(41,49): error CS1657: Cannot pass `line' as a ref or out argument because it is a `foreach iteration variable'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement