• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by BrandMusic · Sep 11, 2014 at 03:05 AM · mouselookbce0005

BCE0005: Unknown identifier: 'MouseLook'

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?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TalismanSkulls · Jan 28, 2015 at 04:44 PM 0
Share

This is the set of scripts I was using and have not found a legit answer to correct it anywhere. $$anonymous$$oving it out of Standard Assets doesn't change a thing.

This is in Js and it continues to give a $$anonymous$$ouseLook as $$anonymous$$ identifier. There does not seem to be an answer.

if(showGUI == true) { Time.timeScale = 0;

GameObject.Find("First Person Controller").GetComponent(FPSInputController).enabled = false;

GameObject.Find("First Person Controller").GetComponent($$anonymous$$ouseLook).enabled = false;

GameObject.Find("$$anonymous$$ain Camera").GetComponent($$anonymous$$ouseLook).enabled = false;

GameObject.Find("FPSArms_Axe@Idle").GetComponent(PlayerControl).enabled = false;

GameObject.Find("$$anonymous$$ain Camera").GetComponent(RayCastCollect).enabled = false; }

if(showGUI == false) { Time.timeScale = 1;

GameObject.Find("First Person Controller").GetComponent(FPSInputController).enabled = true;

GameObject.Find("First Person Controller").GetComponent($$anonymous$$ouseLook).enabled = true;

GameObject.Find("$$anonymous$$ain Camera").GetComponent($$anonymous$$ouseLook).enabled = true;

GameObject.Find("FPSArms_Axe@Idle").GetComponent(PlayerControl).enabled = true;

GameObject.Find("$$anonymous$$ain Camera").GetComponent(RayCastCollect).enabled = true; }

}

Now how about a specific solution so we can get on with this?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by rutter · Sep 11, 2014 at 03:05 AM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image BrandMusic · Sep 11, 2014 at 03:07 AM 0
Share

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.

avatar image
0

Answer by sean3Dmonkey · Nov 03, 2014 at 11:51 PM

I'm having the same error. What does this mean,"You can reference C# code from a JS file, but only if it was compiled earlier."

How do you compile a C# code before you can use it in a javascript? I ask because I'm just starting out learning how to script.

in the http://docs.unity3d.com/412/Documentation/ScriptReference/index.Script_compilation_28Advanced29.html

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?

Sean

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Mouselook.js don't move smooth, its jittery 4 Answers

reset camera position mouselook 1 Answer

MouseLook won't work in Windows (Parallels) 3 Answers

Error BCE0051: Operater '==' cannot be used. Please Help! 1 Answer

Changing Z-Axis of camera 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges