- Home /
Question by
Aubrey-Falconer · Jun 28, 2011 at 01:17 AM ·
javascriptvariablehashtabletypecasting
Manipulating JS hashtables on iOS platforms
Let's say I add a GameObject to a hashtable in JS.
When my build target is set to iOS, Unity begins throwing " is not a member of 'Object'" script errors whenever I try to directly alter a parameter of this GameObject in the hashtable. To work around this, I have to pull the gameobject to a new var out of the hashtable, alter the parameter, and reinsert it.
Is this the correct procedure, or is there a way to let Unity know that the hashtable element in question is indeed a gameobject and that I should be allowed to alter it's parameters?
Comment
Best Answer
Answer by Aubrey-Falconer · Jun 28, 2011 at 01:22 AM
Ah, I should have been using a Generic Dictionary instead of a HashTable. Cheers for Unity 3!