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 FamousJoshua · Oct 26, 2017 at 03:36 AM · build-errorprefabsmissing scriptmissing-reference

Getting a Warning on Build: "Script attached to 'prefab_Name' in scene '' is missing or no valid script is attached." However the prefab it is referring to, as well as the script, have been deleted.

My guess is that there some sort of meta file somewhere that is tricking is into thinking this prefab still exists. If so how would I go about locating and editing that file?

Thanks in advance for any help.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by MattHaughton · Nov 03, 2019 at 11:13 AM

I had the same problem after upgrading to Unity 2019.2.10f1.

To fix I went to Window menu > Package Manager

Then update the Multiplayer HLAPI package. I updated from 1.0.2 to 1.0.4, after that the errors went away

alt text

alt text


screenshot-2019-10-31-at-091415.png (56.5 kB)
screenshot-2019-10-31-at-091544.png (57.7 kB)
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
0

Answer by jchester07 · Oct 26, 2017 at 03:58 AM

Check your scene for a prefab that you deleted from the project folder. It is usually colored red in hierarchy.

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 FamousJoshua · Oct 26, 2017 at 04:48 AM 0
Share

Oh that's something I forgot to add, the scene it was in has been deleted as well. What happened was I did some much needed clean up of old outdated junk in my assets folder. I thoroughly checked the remaining scenes using the various scripts floating around, such as this one, however still haven't found anything that remains of this old prefab.

avatar image jchester07 FamousJoshua · Oct 27, 2017 at 12:40 AM 0
Share

The easiest I can think of is to create a new project and import your assets to the new project.

avatar image
0

Answer by Cuttlas-U · Oct 26, 2017 at 05:24 AM

hi; try this : from asset folder >> right click >> Re Import All

Comment
Add comment · Show 3 · 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 FamousJoshua · Oct 27, 2017 at 12:15 AM 0
Share

Hmm, tried this (good idea), but alas it had no effect. Still get the warning on build.

avatar image Cuttlas-U FamousJoshua · Oct 27, 2017 at 06:49 AM 0
Share

hi; then give me more detailes; give me a screen shot of the error in the console and the exact time that the error appear i mean if u do any thing special that make it happen ;

avatar image FamousJoshua Cuttlas-U · Oct 27, 2017 at 06:30 PM 0
Share

The exact warning message is:

"Script attached to 'Sphere (1)' in scene '' is missing or no valid script is attached. UnityEditor.HostView:OnGUI()"

Where 'Sphere (1)' is the name of the gameobject I've since deleted. It occurs whenever I make a build (with or without "Development Build" checked). It also shows up in the build log generated on a dev build. The warning message is to indicate that you have a component that has either been deleted, or no longer derives from $$anonymous$$onobehaviour.

These guys here found that it can occur because a shadow reference to the script can still be on the object even after you deleted it. But my problem is the object itself doesn't exist anymore so there must be a reference to it somewhere that only the build is running into?

I am using version 2017.1.1p4 of Unity. As near as I can tell it has zero negative effect on the project at all, it's just a $$anonymous$$or annoyance. Appreciate the help!

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

77 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

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

How can I stop the variable values reverting to its default values after being built? 1 Answer

Script on nested prefab Loses referance to parent prefab when instantiated 0 Answers

xcode build failure: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:70:9: No member named 'memcpy' in the global namespace; did you mean 'wmemcpy'? 1 Answer

Unity crashed; saved project deleted?? 2 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