Hi,
Is it possible to add a component to a “prefab” by scripting in edit mode?
(for example in project window)
Thanks in advance.
Hi,
Is it possible to add a component to a “prefab” by scripting in edit mode?
(for example in project window)
Thanks in advance.
Use
GameObject.AddComponent("Name") //easier to use
or
GameObject.AddComponent.< Name >() //more efficient
http://unity3d.com/support/documentation/ScriptReference/GameObject.AddComponent.html