I have looked around a lot and I realize many people have an issue with this, but my main issue is that I had this working for days and then I suddenly started getting BCE0005: Unknown identifier: ‘MouseLook’ popping up.
What I think the problem is that I tried to move the scripts I had just sitting in the assets folder into my scripts folder and then this started happening.
Does it have something to with compiling hierarchy? And if so, why doesn’t it work any more when I moved the scripts back where they previously were?
Given your error code, I know you’re in a JS script.
Last I knew, MouseLook is written in C#.
You can reference C# code from a JS file, but only if it was compiled earlier. Your script worked before because MouseLook was in Standard Assets, which gets compiled before the rest of your scripts.
Yea that's what I gathered from what I read before. The issues is that it's still in that folder and now it won't work for some reason.
It says<" All scripts that are compiled in this step have access to all scripts in the first group (“Standard Assets”, “Pro Standard Assets” or “Plugins”). This allows you to let different scripting languages interoperate. For example, if you want to create a Javascript that uses a C# script: place the C# script in the “Standard Assets” folder and the Javascript outside of the “Standard Assets” folder. The Javascript can now reference the C# script directly.
Scripts that are placed in the first group, will take longer to compile, since when they are compiled the third group needs to be recompiled too. Thus if you want to reduce compile times, put scripts that seldom change into group 1 and scripts that change a lot into group 3. "
But, I do not understand this solution. How do you place the C# script in the “Standard Assets” folder and the Javascript outside of the “Standard Assets” folder?
Yea that's what I gathered from what I read before. The issues is that it's still in that folder and now it won't work for some reason.
– BrandMusic