- Home /
Create a controller for a prefab that will live update all of the instances in the scene.
In short: I want to create list of parameters that I can change in the inspector for a prefab and have it update all of its instances in the scene.
In long: I have multiple instances in a scene and I would like to update them all at once via their prefab. I would like to select the prefab and apply pan, tilt, and color information in the inspector and have that live update all of the instances in the scene.
Currently the way I am doing this is editing one instance in the scene and then dragging and dropping it onto its self in the project window, thus updating all of the other instances.
I am not great with coding and don't have the widest knowledge of Unity so please explain as clearly as posable. Thanks, this is a great community :)
Answer by Happeloy · May 22, 2018 at 07:45 PM
Do you want to make the edits when you are in play mode? If you just want to make sure that all changes you do to a prefab are updated on all instances when not in play mode, click the little "Apply"-button in the top right corner in the inspector. That will update all instances of the prefab.
Thats great, thank you.
That also brings me to my next question. How would I create a script that updates parameters in the scene editor. I don't want to be in the game/play mode to make updates. Ive also got multiple child objects within this prefab that would need to be linked to that one script in the prefab.
I think we might be misunderstanding each other. Pressing the Apply-button will update all instances of the prefab in the scene editor, when you're not in game/play mode. It will be updated throughout the project, in all scenes where the prefab is used. All child objects that are part of the prefab will be updated.
I understand what you're saying and I got it to work. I guess my question now is how to script something that will reference the children of the prefab.
Your answer
Follow this Question
Related Questions
Android controller 0 Answers
Scroll Rect in Web GL 5.4 0 Answers
Unity Android Change Color of Navigation bar 0 Answers
How would i go about making a controller that works like this miniclip game 1 Answer