- Home /
How do i edit all levels at once? (prefab problem)
So i have a prefab called 'game mechanics'.
It contains all the stuff thats the same for every level and the UI. The only other stuff in each level is the terrain, lighting, eventsystem and various obsticles.
What i want to be able to do is to create levels and just drop in this prefab. I then have to change an animation, move a few things around and edit a few values inside it that are level specific.
So that all works fine at the moment, but i also want to be able to edit the prebab in a scene and apply the changes to every scene. What I do is I drag and drop 'game mechanics' back on to the prefab to change all the scenes. The problem is that is that all the levels are reset EXACTLY to that one which means i have to go back and change the values and move stuff back to the right position on every level each time i make a change.
So is there a way to do this where it dosent reset EVERYTHING?
Answer by Xarbrough · Jun 22, 2015 at 12:57 AM
No, prefabs and instance management are more or less exclusive. Use a prefab if it remains the same at every instance. If you need to change a few things here and there you can create a prefab for every scene, like GameMechanics1, GameMechanics2 and so on. This way you can multi-select those prefabs in the project folder an take advantage of the inspectors power to multi-edit individual values.
Another note: A prefab this big and nested is generally calling for problems. If the above solution is getting out of hand you simple might be putting too much into one object. Better split it up into multiple sub-prefabs, but again, no instance changing, create individual prefabs for every different version so you can multi-edit via the project panel.
Duplication of the Game$$anonymous$$achanic is what I think the answer is. it will always reset to that one because you only have one.
Your answer
Follow this Question
Related Questions
Passing array of prefabs to next scene 1 Answer
dynamic prefabs in streamed scene asset bundle 1 Answer
Git and .scene/.prefab 2 Answers
Storing scene-specific variables? 1 Answer
How can I add visual effects on the OVRPlayerController? 0 Answers