- Home /
Question by
finlay_morrison · Aug 01, 2017 at 12:32 PM ·
script.objectheirarchy
how to add an already existing script to an object in the heirachy
I'm trying to add a script i imported to an object called LevelManager, the only way i can find to get a script on this object is to make a new one and i don't want to do that, as i already have the script, so I ask, how to i add the script to the object.
Comment
Just drag the imported script onto the object?
Please be more specific.
Answer by a161803398874 · Aug 02, 2017 at 10:06 AM
javascript
var fbs = gameObject.AddComponent(newScript);
this will add a script called "newScript"
Your answer

Follow this Question
Related Questions
See camera point of view ingame 1 Answer
how to capture object? 0 Answers
How to manage an object using joints? 0 Answers
attaching the hingeJoint to the desired point 0 Answers
how to scale the transport? 1 Answer