|
Is it possible to use the List<> class in iOS? What I want to do is have a List that gameObjects are added to and removed from at runtime. Afaik such a thing can only be done through Lists. If the use of Lists is not possible in iOS, how would I do such a thing? With ArrayLists maybe? I've read in more than one places that they should be avoided.
(comments are locked)
|
|
You can use List just fine on iOS, in both c# and js. You need using System.Collections.Generic; for c# and import System.Collections.Generic; for js, at the top of the file. For js, you'll need to use List. instead of List like c# Thanks Mike. I've read that Generics are not supported at all on iPhone, because it runs on an earlier version of Mono. Is this info outdated? You're saying that I can create a List from inside a js?
Jan 18 '11 at 10:32 PM
schwertfisch
Here's where I've read it: http://robotduck.wordpress.com/2009/11/04/88/
Jan 18 '11 at 10:36 PM
schwertfisch
That was from 2009, we've come a long way since unity iphone 1.5 or so - can use list with both c# (since, uh, unity iphone 1.6?) and js (since 3.0)
Jan 18 '11 at 11:17 PM
Mike 3
Thank you :)
Jan 18 '11 at 11:17 PM
schwertfisch
(comments are locked)
|
