Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by jadde_dahlberg · Sep 10, 2018 at 02:07 PM · androidbuildbuild-errorloglogging

Script Reference Problem...

Hello everyone!

I am recently getting an error telling me a script reference is missing. Normally when those appear is when I've removed a script that was attached to an object. And Unity guides me to that object quite well.

However recently I have gotten the same message but without a reference in the console. The message that displays says

The referenced script (Unknown) on this Behaviour is missing!

And it does this about 60 times in the console. After all of those messages I get 2 messages saying

No script asset for GameObjectSelectionItem. Check that the definition is in a file of the same name.

I have gone through every single object in my scenes, and every single prefab in my folders. Yet I can't find it anywhere, where a script is missing. What I did notice however! Was that this only occured to me while in playmode. And only if I had switched my target from Windows to Android. And I need it to be on android because that's where this game is going.

So why do I only get this message on Android as target. And not as Windows? How do I solve it?

Thanks a lot!

Comment
Add comment · Show 2
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 FernandoHC · Sep 10, 2018 at 02:15 PM 0
Share

Not sure how complex your project is, but as a starter, if the issue only happens when you run android, I'd search for the definitions of "#if UNITY_ANDROID", you possibly have some definition missing when using it.

avatar image Atiyeh123 · Sep 10, 2018 at 02:33 PM 0
Share

Hi, you may attach a script to a gameobject(prefab,scene objects) and some how you delete the script so object cant find the attached script. also it can be a bug of VS , restarting project may solve error.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by misher · Sep 10, 2018 at 02:17 PM

One of you monobehaviour classes may have different name as their file name. Check all filenames to be exactly the same as your monobehaviour class names. Also there may be a bug with solution. Remove all .sln files from you project and reopen Visual Studio.

EDIT: Check all scenes if they contain gameobjects with missing references/ deleted scripts

Comment
Add comment · Show 5 · 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 jadde_dahlberg · Sep 10, 2018 at 02:59 PM 0
Share

Thanks for responding! I tried the things you told me to do just now and I'm still getting the error. I went through every single script that I have created meaning (not going through the Unity Ads SD$$anonymous$$s scripts). Since I haven't touched them. And also removed all the scripts that arent even being used in the game. Also removed the .sln files I could find.

Again I'm getting the same errors :/ But I'm still very curious as to why I get these errors when I change the Platform to Android ins$$anonymous$$d of Windows. I think that's so weird. Why would I get an error like that just by switching platform?

Anyways, I tried building the game anyways and I put it on my phone. And there is a difference with the build and the Unity Editor.

In the Unity Editor when this error appears the game freezes for a second or so. Then it displays the errors.

On the build on my phone it doesnt freeze or anything and it seems to be working just fine. But I'd really like not to have any errors nonetheless haha.

Thanks for your time! :) Really appreciated.

avatar image TreyH jadde_dahlberg · Sep 10, 2018 at 03:03 PM 0
Share

Can you paste GameObjectSelectionItem.cs here?

avatar image jadde_dahlberg TreyH · Sep 10, 2018 at 08:14 PM 0
Share

Yeah... For some reason that file doesn't exist..

avatar image misher jadde_dahlberg · Sep 10, 2018 at 03:17 PM 1
Share

The script may be in some third party plugin you use for android...

avatar image jadde_dahlberg misher · Sep 10, 2018 at 08:15 PM 0
Share

Hmmm :/ $$anonymous$$aybe you're right that doesnt sound completely far fetched haha. Thank you! I'm gonna keep digging though to see what I can find.

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

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

Related Questions

Android Build 0 Answers

Android - Failed to repackage resources error after installing facebook plugin 2 Answers

I have a build problem android. 0 Answers

Gradle Build Failed Unity version 2020..3.23 1 Answer

Android gradle build error 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