[Unity 2018.3.0b3] Prefab loss reference to child objects when moved to scene
Hi, i have problem with prefabs. In new prefab editor my references to prefab's childs objects are there. But when I drag'n'drop to scene (or create instance via script), the reference are gone and I got null ref exception. Do anyone have same issue?
Okay, I think I know what's going on, the prefabs was created before update Unity to newer version, that's why they loosing data after instantiate (what is not cool!). When I manually recreate them on scene and then apply changes, that works. But I also using some 3rd part very complex prefabs which also not working with my version. I will try to the newest beta version (b5) and check if that works
Answer by hyderox · Feb 02, 2019 at 02:02 PM
This happened to me as well, and "Reimport All" didn't work. However:
My problem was with Odin plugin's [ShowInInspector] attribute to a private field. After I changed [ShowInInspector] to [SerializeField] it worked fine.
Answer by laessnb · Feb 13, 2019 at 06:44 PM
This helped me a lot. Also, if you know which specific prefab is broken, you can do just a Reimport on that prefab to save some time.
Your answer
Follow this Question
Related Questions
How to store a GameObject in an AssetBundle and this on harddisk/webserver via editor script? 1 Answer
Prefab turned invisible after running the game *See image* 0 Answers
Arrows fire in reverse. 1 Answer
Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption. 0 Answers