Hi guys
finding this confusing, newb here. How do you copy a prefab to be able to slightly change it. ie the color for example.
I drag my original to the hierachy then onto my game object folder in the project window and it asks me if i want an original or a variant, but no matter which i select, if i change the color it changes both. Even tried copying it separately and still they both the same color if i change one.
1 Like
Iām not sure if it is the best way to do that, but you can wrap your prefab in a new object and then save it as a prefab. That way you will have a few separate prefabs, that will all contain an original prefab with any changes that you want to keep
From your descriptions it sounds like you want to create prefab variant. How exactly are you modifying the color after creating prefab variant. Are you editing it in original prefab, the variant, or object in scene? Is the color part of renderer component or the material? This will depend on the kind of thing you are rendering and shaders you use. Sprite renderer has color property as part of component, but 3d mesh renderers rely on the color from material. Materials are separate assets and can be reference by multiple objects and prefabs. Changing color field in material will affect all objects using that material. You can create a new material and assign it to the prefab variant.
There may be some confusion since the material properties are displayed at the bottom of object inspector, so it may not be obvious to beginners which properties are part of object and which properties are part of external material asset referenced by current object.