- Home /
What is the difference between grey and blue prefab ?
Hello everyone.
I have a question about the display of the instanciated prefabs into the hierarchy window.
If I drag and drop a prefab in the project explorer into the scene, it is colored in blue. But, when i do that in script, the prefabs are named myPrefab (Clone) but colored in grey.
UnityEngine.GameObject NewPrefab = (GameObject)Instantiate(myPrefabList[rdChoice], newPos, Quaternion.identity);
Does that means I loose the instanciation ? What is the meaning of the blue color ?
Answer by Adam Rademacher · Oct 13, 2010 at 07:06 PM
The blue color means it is still linked to the prefab--thus if you change something on the prefab object in the project, all of the blue copies of that will also change. If it is colored grey, it is 'broken' from the prefab and controls its own set of components and variables.
I believe that Instantiation doesn't link the cloned object back to the prefab because it is intended to be used while the game is running, where prefabs don't matter as much.
Do you know how create blue prefab in script? I can't do it with Instantiate() function
Your answer
Follow this Question
Related Questions
Change Parent of Multiple Instantiated Objects 1 Answer
Updating a variable on a script in an instanced object 1 Answer
Possible Bug? GameObject.Instantiate copies instance instead of Prefab 1 Answer
How to instantiate from prefab, not from instance? 3 Answers
How to get all objects instantiated from a single prefab? 1 Answer