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 /
  • Help Room /
avatar image
4
Question by sirius_black9999 · Jun 17, 2016 at 09:03 AM · serializationcomponentsreferences

Components losing all references in inspector

Hello,

on semi-regular occasions, all instances of random components will lose all their inspector data

For instance this morning, all instances of our "fit background to camera" script and our "show icon if game object is active" scripts lost all of the data that was assigned to them in the inspector

this was after newly booting the scene this morning and it appears that this data was lost from the save file as reloading unity does not fix the issue

as this happens every few weeks on entirely random game objects (sometimes NGUI components, sometimes our own scripts, usually code that hasn't been touched in months) it is becoming quite a hassle to fix this

is there any indication as to what might be causing this?

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 phxvyper · Jun 17, 2016 at 10:11 AM 0
Share

Are these prefabs or objects that exist in the scene?

avatar image tuncOfGrayLake phxvyper · Jun 17, 2016 at 10:13 AM 0
Share

Objects that exist in the scene.

3 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by jethrogillgren · May 10, 2018 at 12:35 PM

Closing and opening Unity just fixed this for me.

I had lost all refs after updating an asset, which triggered an API Upgrade, fixing some errors and Re-opening the project.

All scene refs were gone, as you describe.

I closed and opened Unity and all the references came back - worth a try before you panic and roll back your scene.

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 Akrone · Feb 13, 2019 at 01:47 PM 0
Share

Thanks I had the same issue when i upgraped all of my externals DLLs, just reopening the editor fixed it

avatar image
2

Answer by Trinary · Jun 17, 2016 at 04:50 PM

This is typically caused by not paying attention to the fact that unity generates a meta file for each file in your project. The meta file contains an id for that file, and unity uses that id to keep all the references linked up. If you move or rename a file without also moving or renaming the meta file then this id will be lost as soon as you select the Unity window. Unity will generate a new meta file with a new id, and all the links will be broken.

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 Florestan · Jun 12, 2017 at 06:20 AM 1
Share

I do no such thing as moving the files around, and I get the same problem. It's more than just annoying, it's a great loss of time to have to re put all the data again in there every few dozen of $$anonymous$$utes. I also tried to copy the meta files to put them back faster, but unity erased them as well, for some reason.

avatar image ZeroByter · Mar 17, 2019 at 02:37 PM 0
Share

This happened to me after an upgrade and I seriously panicked. Started thinking about how stupid I was for not updating like the smart prompt told me to.

Then I saw your comment, big sigh of relief when I tried it and it worked.

avatar image
1

Answer by rayuthebest · Dec 26, 2017 at 10:40 AM

I got this same behaviour some random times and the only solution that I had found is generating a prefab with the objects that contains the references.


If the prefab contains all components referenced, they are not lost when this random event happens, while references to components outside the prefab are reset (references to prefabs are not lost although they are not placed on the scene).


I good trick to know if a prefab is well defined is checking if all references are marked as normal. Bold references are outside the prefab, and they may be reset.


Has anyone found a best solution?

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 burnout156 · Jun 19, 2020 at 04:51 PM 0
Share

thanks, its work for me, i just save sprite every json modification, because otherwise it loads the default image, and not the image that I had already modified

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

69 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

Related Questions

How to break reference from .asset classes and runtime copied values? 2 Answers

Use c# "ref" with a GameObject or Component 1 Answer

MonoDevelop can't find references for scripts in Editor folder 0 Answers

How to Serialize or Save a List of GameObjects 1 Answer

.data serialize and deserialize work in editor but not in build 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