|
Hello, I'm trying to access a variable inside a class, but I'm having problems: The 'jetPackModek' won't 'turn off'. What am I doing wrong here? Thanks
(comments are locked)
|
|
public var jetPackModel : GameObject;
(comments are locked)
|

I don't code in javascript usually, but if its access policy is anything like C#, then the access modyfier is private by default, that is, when you write "var jetPackModel", the compiler assumes you mean "private var jetPackModel". You can't access a private class member outside the class. Add "public" in front of it and see if that helps.