- Home /
Save Components setting for reuse
Hi Guys
I am Trying to write a Editor Script in which i want to save all components of a game object Which i have added and those other components that a game object already have like Transform mesh filter etc i want to save their settings as well so i can use it again when i import the same game object again in my scene
I want to ask that if something like that is possible and if yes then how and where to start it every help and suggestion would be wonderful
i am making this script for the reuseablity of component's setting i have to do again and again so take a look into this matter and help plz Thanks
yes but i don't know how to import setting again on the game-object and its childerns using a prefabs
Answer by vexe · May 13, 2014 at 11:29 PM
Are you doing this only at edit-time? If so, you can use UnityEditorInternal.ComponentUtility.CopyComponent
(which is the same as doing a "CopyComponent" from the settings popup in the inspector) - There's also a paste method. Or you could do a deep copy of the component's values. I recommend the first method if you want an editor solution.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Gizmos icons 0 Answers
Detect if build target is installed 1 Answer
Keep track of how many times the editor goes into play mode? 2 Answers