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 Jordi 5 · Mar 31, 2011 at 11:58 AM · monobehaviourmissing-reference

Referenced script missing

So I've been adjusting some script references (One only, really), and now I'm getting this error: "The referenced script on this behaviour is missing!" And the only explanation when clicking it, is: "Assert in file: /Applications/buildAgent/work/f724c1acfee760b6/Runtime/Mono/MonoBehaviour.ccp at line: 1667." Double clicking the error leads me nowhere. What should I do?

Comment
Add comment · Show 4
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 Justin Warner · Mar 31, 2011 at 12:08 PM 0
Share

Seems like these are beco$$anonymous$$g more frequent... Like, internal builds missing key scripts... I'd say try a reinstall... $$anonymous$$ight work? I really don't know...

avatar image Statement · Mar 31, 2011 at 12:55 PM 0
Share

Its more likely a user error.

avatar image DFortun81 · Jan 13, 2015 at 12:32 AM 0
Share

It sounds to me like you did the same thing my studio (initially) did and you're using and sharing prefabs across multiple computers. While this seems like an elegant solution, it's really not. When you copy over your shared code, objects, and textures, make sure to also copy the (.meta) files associated with them.

avatar image risingsunshine · Apr 07, 2016 at 10:45 PM 0
Share

We use this tool to find out all the missing script locations in our projects. It really saved us a lot of time.

2 Replies

· Add your reply
  • Sort: 
avatar image
6

Answer by Ray-Pendergraph · Mar 31, 2011 at 12:51 PM

This happens if you have a component (MonoBehaviour) that is instrumented or "hung" on a game object and that component's source file (.cs or .js) has been:

  • externally moved so that Unity no longer has a handle to it.
  • deleted
  • externally renamed
  • put into a package (MonoBehaviours cannot be in packages)

Usually if you are running the game selecting the error in the console will highlight the offending game object or you can browse through them and look for "Missing Script"... sometimes it leaves enough information there such that you can tell what was there. After you figure out what's missing, just re-add it.

This does not indicate a Unity install issue.

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 thienhaflash · Dec 14, 2013 at 02:48 AM 0
Share

I wonder how much hard if unity $$anonymous$$m add more information on the missing script, ins$$anonymous$$d just save the serialized data, unity can save at least script name or something so we can based on that to resolve. We used external editor a lot and can not just goto Unity IDE and rename each file when refactoring. It's very frustrating experience ... $$anonymous$$oreover, even if user did not rename outside, after every unity crash (by an infinite loop bug or something), the references also likely to be missing... I put a comment in the feedback here, please vote, everyone : http://feedback.unity3d.com/suggestions/missing-monobehaviour-to-tell-wh

avatar image
1

Answer by liortal · Feb 24, 2015 at 12:21 PM

There are different types of "missing script" behaviours in Unity, as already stated by Ray. We are using this custom script to help us find all missing references in our project: http://www.tallior.com/fixing-missing-references/

See the console output for all the missing script locations. This saves us a ton of time when we encounter these issues.

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.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Obfuscating DLL classes from the users 1 Answer

Accessing a variable in one script from another script? (using C#) 1 Answer

Can a script be used without a gameObject and then be attached to a gameObject? 2 Answers

How do I detect that MonoBehaviour is modified in the Editor? 2 Answers

unity script error 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