Is it possible to create a main camera through C#. I have deleted the Main Camera Game Object in the Scene. So far I have
camera = new GameObject("MainCamera");
The camera dosent appear though when pressing play.
@Mfarban The scene needs some camera to initialize. Keep the existing camera tagged MainCamera in the scene and destroy it right at the startup. After that replace it with the new one. So I would do this
Camera cam = Camera.main;
GameObject newCam = new GameObject("newMainCam");
You may want to create a camera prefab and instantiate that.