- Home /
Question by
stanislavdol · Jul 30, 2014 at 12:30 PM ·
gameobjectprefabruntimeprefabutility
PrefabUtility.ReplacePrefab trouble
Hi, there! PrefabUtility.ReplacePrefab is very useful to make prefabs from gameobjects. With colliders, materials etc. However, when I change one of the gameobject's shader variables, it won't save gameobject material at all. So I get a prefab without a material.
Any ideas how to silve this?
Thanks!
//Problem solved. U just need to save materials as well, cause unity use instances of materials if u don't use sharedmaterial.
Comment
Your answer
Follow this Question
Related Questions
transforming a prefab randomly at runtime 3 Answers
Instantiate object 1 Answer
Reset an GO to its original state (start app state) 2 Answers
Adding Prefab Components 1 Answer
How to export Prefab to .FBX file on iOS platform at runtime ? 0 Answers