- Home /
Unity Prefabs, Prevent a Property be apply to all Instance
In Unity Prefabs.
Default Behavior is when click apply button it apply to all the instance in that prefab.
I know, When i change a property in one prefab and change the same property in another prefab. hit apply the value of the property is not sync between those two modified instance. Well Describe in Here
The problem is. i don't want to individual modify a property of each prefab instance to get that behavior.
What i want is: in a public property, the default value need to be added as prefab property value and when i modify one instance and hit apply i want that specify property not apply to all the instance but other properties that i modify in that prefab.
is that possible? thanks
AFAI$$anonymous$$: No. Give more context to what this property is and how it's used you might get more info.
@getyour411 in this one its "speed" in every stage it changes to different values. prefab name player. i have 50+ stages. there are lots of values in comment in every player but not "speed". i have to tweak the common values and apply to all players. but i don't want speed to sync.
Why not
GameObject go = Instantiate(go,pos,rot);
go.speed = (some value you deter$$anonymous$$e at runtime based on stuff);
(some value you deter$$anonymous$$e at runtime based on stuff)
$$anonymous$$ore explanation please.
On my understanding "some value" is gonna apply to all players and it become a one value. when i hit apply.
I think what doopp means is not using the prefab workflow but to build your own and independent. This indeed can be a solution. Especially in combination with ScriptableObjects where you would store the necessarily shared values in the prefab, the individual values in an instance of scriptable object and finally store a reference to the prefab in the instance of the scriptable object. You whol workflow is then scriptable object - centric, and not prefab centric. In fact this is a fairly common solution among unity folks.
Answer by stepan-stulov · Aug 08, 2015 at 04:27 PM
Unfortunately Unity's from-the-box functionality does not have selective prefab apply. It's an all-or-nothing button. You would have to either create your own editor script or use a third party tool. I can't help you, as I don't know, but you might wanna research on "selective prefab apply" or similar in the Asset Store.
As far as I know Unity guys are working on something like that as part of a bigger prefab revision process. It will hopefully include prefab nesting, inheritance and an advanced workflow. But it's not officially out yet.
Unity guys are working on something like that as part of a bigger prefab revision process.
Well that's a big news. Nice to hear, this might be the answer for now then. i just give this question more time and see.
Your answer
Follow this Question
Related Questions
Unity3d and monodevelop c# scripting on ubuntu 16.04 IntelliSense problems 0 Answers
Is it possible to create a hole for a door in a wall-like cube? 2 Answers
Draw a line from object to indicate power 0 Answers
Unity Editor not installing from unity hub.,Unity Editor is not installing from unity hub. 0 Answers
How would I fix this 0 Answers