I have a door I created with some colors shader and more. When I dragged the door some time ago and it asked me what to do I selected variant. But now I decided to select to create original prefab and the door colors or maybe it's the shader become pink.
This is a screenshot of the prefabs the original and the variant in the Assets. The one in pink is the original the one in red and it should be in red is the variant.
What is the difference between prefab(original) and variant prefab and why it's changing the color to pink when making original ?
What should I choose ? Original or variant ?
And a screenshot of the door in the scene view window before dragging it to the Assets :
A prefab is an asset type that allows you to store a GameObject complete with components and properties. This allows us to share pre-configured hierarchies of objects between scenes. The prefab acts as a template from which you can create new object instances in the scene in the Editor and at runtime.
Prefabs are a special type of component that allows fully configured GameObjects to be saved in the Project for reuse. These assets can then be shared between scenes, or even other projects without having to be configured again. This is quite useful for objects that will be used many times, such as platforms.
To check if an object is part of Prefab contents in Prefab Mode, use PrefabStage. IsPartOfPrefabContents.
Just like you have a regular prefab in order to have a predefined object, you have prefab variants which is just another level. It represents the need to have different predefined versions of the prefab itself. Prefab variants are usefull when you don't want to override the base prefab, but you want to use the overrided one multiple times, so you make a prefab variant.
https://www.youtube.com/watch?v=ibmdm_PoyMA
So basically when you have a prefab instance and you make changes to it, you can either override the original prefab (losing its original state), or you make a prefab variant and then you can have both of them as prefabs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With