Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
1
Question by nowhereman · Dec 21, 2010 at 05:50 PM · staticbce0005unknown-identifier

'Unknown Identifier' - cannot recognize other scripts

This hasn't been a problem with the scripts so far, all of these scripts are old scripts i did a few months ago, but all of a sudden i get a "BCE0005: Unknown identifier: 'OtherScriptName'." error when on the other script i have OtherScriptName.staticvariable. It's like suddently something happened to the game where it can't recognize other scripts, like there's some kind of problem with compiling. All of my scripts are in javascript. I can't think of any changes I've made recently that would cause this problem... any thoughts?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Mike 3 · Dec 21, 2010 at 06:07 PM

If you put one of your scripts into Plugins, Standard Assets or anything similar, it'll be compiled earlier and won't be able to link with your other scripts that are compiled later. The errors should point at the file in the wrong folder, move it out of there and it should fix it

Comment
Add comment · Show 6 · 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 nowhereman · Dec 21, 2010 at 09:18 PM 0
Share

That makes sense but all the scripts are in the same folder in a seperate folder from standard assets, named Scripts

avatar image nowhereman · Dec 21, 2010 at 09:49 PM 0
Share

Huh. so i had the scripts divided into different folders inside that Scripts folder, so maybe that was making them compile at different times? i moved all the scripts into the same folder and now it's working, so you were right. Thanks! By the way, would something similar happen to materials attatched to prefabs if they were not in the same folder? I've been having trouble with the links between the two breaking randomly, and haven't been able to solve this problem before...

avatar image Mike 3 · Dec 22, 2010 at 12:11 AM 0
Share

For the scripts thing, yeah it'll be a na$$anonymous$$g issue with the subfolders. For the prefabs thing it shouldn't matter which folder your scripts are in, as long as you don't try move either of them from outside of unity

avatar image nowhereman · Dec 23, 2010 at 06:28 AM 0
Share

Okay, well thank you!!

avatar image Lenn Dolling · Aug 07, 2011 at 01:34 AM 1
Share

wow.. I was not aware of this early compileing of scripts based on file location... this is the first bit of text I have read on the matter.

nice link I found with other details. http://answers.unity3d.com/questions/20801/global-variables-static-keyword-unityscript-javasc.html

Show more comments

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.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Static variables problem 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Can one use of a static variable, change it globaly? 2 Answers

using non static variable in static function 1 Answer

Four different Raycast functions? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges