Reference mess when instantiating prefabs at runtime
Hello. I just bought this asset for my game, as I needed badly the nested asset functionality, but I am encountering a few issues that prevent my logic from working properly.
The first issue I noticed is that when you instantiate a prefab at run time, instead of instantiating it from the editor (Doing this is critical for my game!) the references inside the script to the objects inside the prefab get messed, and instead of pointing to the instantiated objects, they point to the prefab.
This is definitely a bug, as when you instantiate the prefabs from the editor, the references point to the instantiated objects as excepted, and it also does this when instantiating unity's default prefabs at runtime.
Let me know if you need help reproducing the issue, but it is really easy to do so, so I guess you will be fine.
Could you please try to fix this as soon as possible? It is a blocker problem in my case.
Best Regards
Comments (4)
-
-
reporter It is a custom script that references objects inside the prefab. When the object is instantiated (at runtime) the reference points to the prefab, instead of to the instantiated object.
-
Thank you for that information. Could you send me an email at devon@antihero-studios.com with your invoice Id. I just submitted 1.4 to the asset store for approval but it will take a couple of weeks. I'd like to get you an updated version of uPrefabs so you can test to ensure that this bug has been resolved.
Thanks,
-
- changed status to resolved
Fixed in 1.4f1 currently in asset store review
- Log in to comment
Damian,
Thank you for reporting this issue. Could you briefly describe what is losing references? Is it a custom script that you have references on or something else?