|
I am trying to disable and enable MouseLook script, and I actually know how:
but, the problem is that in my script I am using JavaScript and the script MouseLook is c#. And I am not doing something wrong because I already check with another script that is JavaScript and it works, so how I can make it work with JavaScript and C#?
(comments are locked)
|
|
Oh, yeah, after checking and checking questions and answers I finally found the correct answer to my question that is here: http://answers.unity3d.com/questions/39269/disabling-a-script-mouselook I only need to do this:
and it works :), but thanks anyway for the other answer Sure, that's the slow, dynamic, during runtime way... ;)
Apr 20 '11 at 11:00 PM
Bunny83
(comments are locked)
|
|
its actually even more basic, it looks something like this: No Problem ^^
(comments are locked)
|
|
So what exactly is your problem? Probably it doesn't know the Type of the c# script? Then try adding the C# script to the Plugins folder. sorry, what exactly do you mean?
Apr 20 '11 at 07:59 PM
Uriel_96
Well, that's a problem with the build order in which scripts are compiled. Some special folders have different position within the compiling process. Sometimes it helps to place the scripts in the plugin folder to circumvent such errors. C# and JS scripts end up in seperate assemblies(DLLs). That's the reason why you can use a JS class in C# but the assembly have to be there before it can be used. It's a crosslinking problem. I would always try to use only one language ;).
Apr 20 '11 at 08:55 PM
Bunny83
(comments are locked)
|
