- Home /
Serialize script fields of prefabs with other prefabs, so that when I drag them into hierarchy, the connection becomes between game objects?
I have a UI Manager with a script that references other objects (canvases, etc.). I have turned the manager into a prefab, as well as the UI elements (so that I can quickly add them after creating a new level). But whenever I drag the prefabs into the hierarchy, I need to manually fill all those fields. I tried establishing the necessary connections in the project view (with prefabs), but when I instantiate them, the connections remain to the prefabs, not to the newly instantiated objects. Can I make this process easy so that I don't have to fill all those fields after every instantiating?
Answer by foxt451 · Feb 25, 2021 at 01:03 PM
So I've managed to achieve what I wanted by creating a "template" scene, with all the managers and UI already in place. When I want a new level, I just duplicate this scene and build on top of that.
Your answer
Follow this Question
Related Questions
Unity loading prefabs difficulties. optimization 1 Answer
Unity 2D Game Issue: Script is only affecting one prefab instead of all of them. 0 Answers
How can I save multiple instances of a single prefab? 1 Answer
Script can't save data into file 1 Answer
Prefab disables a script out of runtime. 0 Answers