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
8
Question by LEGEND383 · Jun 30, 2015 at 11:32 PM · uiguiunity5missing-reference

gameobject references runtime script in scene file

I added some UI components to my scene and now I keep getting this error whenever I try to run the game. What does this error even mean, the exact line in the reads

 GameObject (named 'Canvas') references runtime script in scene file. Fixing!

which tells me that the object in the scene is using runtime scripts (which would make sense to be doing at runtime) and that it's fixed whatever problem it was having (obviously not, as the game still does not run).

I also get a ton of warnings saying that scripts are missing on objects (core scripts that are part of Unity), even though these scripts are still showing in the inspector without any issues.

Anyone else encounter this problem and have a solution?

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 gregroberts · Jul 09, 2015 at 12:02 AM 0
Share

Having exact same issue. No solution yet. Game runs fine in editor, refuses to compile / build.

avatar image lermy3d · Jul 29, 2015 at 04:41 PM 0
Share

I am also having this issue for every script that Unity defines as 'runtime script', no idea why! But is updating the references of my scripts and showing this message exactly as you posted. I am creating my prefabs from a bundle.

In my scene the scripts are working but I am getting 180 warning logs and 89 error logs. Very annoying, in addition of the doubt if what I am doing is right or wrong.

avatar image meat5000 ♦ · Jul 29, 2015 at 08:20 PM 0
Share

Reinstall Unity. I dont say that very often.

avatar image aeroson · Jan 06, 2016 at 10:23 AM 0
Share

Despite Collider and others inheriting directly from Component, if you try to inherit from Component yourself Unity will go nuts.

15 Replies

· Add your reply
  • Sort: 
avatar image
23

Answer by danielfelixalves · Oct 08, 2015 at 12:12 AM

Possibly not the only time you would see this error, but you will see it if you have a script attached to a Game Object and you decide to remove its inheritance to MonoBehaviour (e.g. because you don't need it)

It becomes a "Runtime" script which (most likely) should have not been attached to a Game Object to begin with.

Maybe in this occasion the Game Object named "Canvas" contains an attached script to it which does not extend MonoBehaviour or ScriptableObject.

Comment
Add comment · Show 2 · 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 sillyjake · Dec 29, 2015 at 10:55 PM 1
Share

Thanks kind sir! Reimport all worked for me.

avatar image Han13in sillyjake · Mar 07, 2016 at 10:21 AM 0
Share

however it not work for me :-(

avatar image
7

Answer by hoseinakbo · Aug 18, 2015 at 06:46 AM

I used Assets/Reimport All and it was fixed

Comment
Add comment · Show 2 · 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 dagongraphics · Dec 11, 2015 at 03:27 AM 0
Share

This fixed my project too. Thank you :)

avatar image sparrow · Jan 21, 2016 at 03:25 PM 0
Share

Thanks this helped me

avatar image
3

Answer by amzin7000 · Aug 23, 2015 at 02:43 AM

I noticed this happened to me whenever i tried creating a world space ui. Deleting it removed the errors. Creating a new one created the same ones as before.

In the end I backed up my project and fixed it by clicking Assets>Reimport All and the UIs and everything else worked fine.

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 Aman1234 · Apr 22, 2016 at 09:39 AM 0
Share

same.its work for me..

cheers

avatar image
2

Answer by tibithegreat · Sep 26, 2015 at 05:55 PM

This may be an old thread but I had the same issue and I found on a chinese blog I think that the problem was that one of my scripts didn't inherit MonoBehaviour.

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
avatar image
1

Answer by gregroberts · Jul 29, 2015 at 09:34 PM

My only solution was to go back to a backup of the project that I had made two days earlier, and to re-do the tasks that we had recorded in the worklogs across that time. We worked on this for 2 solid days, that was the solution.

Comment
Add comment · Show 2 · 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 lermy3d · Jul 29, 2015 at 09:58 PM 0
Share

Wow! Great it worked for you! In my case this is not an option though :(

avatar image meat5000 ♦ · Jul 29, 2015 at 11:55 PM 1
Share

recorded in the worklogs

+1 for good practice.

  • 1
  • 2
  • 3
  • ›

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

43 People are following this question.

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

Related Questions

UI is not visible on Android lollipop after upgrading from 4.6 to 5. 0 Answers

Positioning Context Sensitive Popup Menu Using 4.6/5 UI system 1 Answer

How do I keep an ui element in side of the canvas when scaling? 1 Answer

Unity 5 GUI Buttons Won't Show When Built 0 Answers

unity scrollview doesnt bounce 0 Answers


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