Ejemplo n.º 1
0
    public GameObject CreateCamera(GameObject shipObject, string model)
    {
        GameObject cameraPrefab = (GameObject)Resources.Load("Prefabs/Cameras/Capital/" + model + " Camera");
        GameObject cameraObject = Instantiate(cameraPrefab);

        cameraObject.transform.name = "Main Camera";
        CameraOrbit orbit = cameraObject.GetComponentInChildren <CameraOrbit>();

        orbit.focus = shipObject.transform;
        orbit.Initiate();

        return(cameraObject);
    }