Can i create some object (camera, for example) without creating prefab, drag’n’drop it into public field in script and instantinate it?
i want create object from script. something like this:
var my_camera = Instantinate(new Camera());
in c#
i know about CreatePrimitive. i need to create more complex object. camera, GUIText etc.
thank u.
1 Answer
1new GameObject(“MyCameraThing”).AddComponent();
Now you have a new GameObject with a Camera component.