- Home /
in-editor cloning of game objects
How do you use a script to clone objects not during run time, but to just set up a scene in the editor?
I dont quite understand what it is you want, scripts only run at runtime?
But if you want to clone a gameobject in the editor, then just use copy/paste?
yea, its kinda vague question.
maybe you can add this on top of your JavaScript.
@script ExecuteInEdit$$anonymous$$ode()
well, if you want to put gameobjects in a circle, it is easier to just set them using script.
Answer by Jake-L · Jun 10, 2011 at 10:24 AM
You may want to look into custom inspector views.
In all editor scripts (you'll need to place these scripts under /Assets/Editor) you have access to these editor classes that can do almost anything in the editor.
So create a custom inspector, add a GUI button to it that will clone something you want and you're done.