Hi
I’ve started to write on C# under Unity iPhone and got simple problem
I wrote string
CharacterController Controller = GetComponent();
and get error “missing ;” in Unity iPhone
it goes ok on PC\Maс Unity
Can you help me with this?
Hi
I’ve started to write on C# under Unity iPhone and got simple problem
I wrote string
CharacterController Controller = GetComponent();
and get error “missing ;” in Unity iPhone
it goes ok on PC\Maс Unity
Can you help me with this?
Can you quote more of your code, and use code tags so we can tell where the English ends and the C# begins?
The line of code you posted requires generics–under Edit | Project Settings | Player is your .NET API compatibility set to at least 2.x? Also, are you using the 1.x or 3.x flavour of iPhone?
thank you much!
I have Unity 2.6/Unity iPhone 1.5
the problem was solved by replacing
GetComponent
by
GetComponent( typeof( MyType )) as MyType;
thanks to vastor and mike_mac