I have a large unity3d javascript script I am trying to run on iphone. I’m getting tons of errors about variables not having their types defined. If I put # pragma strict at the top of the script it shows the errors in the unity compiler console.
My question is do I have to redefine all these using var? Or is there some shortcut setting that I can use to bypass all the errors?
What about arrays? Right now I have javascript Arrays like myarray=new Array();
Should I just use something like myarray=Vector3;
I have an array full of rotations. What kind of array is that? Quaternions, Vector4?
I use lots of hashtables how do I define ahead of time what’s going in those?
What about functions? Some functions complain others do not. Do I define the arguments in the function declaration?
function myfunction(a:int,b:int);
Is there any documentation that says everything you have to do to go from javascript to iphone? – things like eval() does not work, or that you have to define every variable etc… use built in arrays, etc…
Thanks,