private void Awake()
        {
            camera             = GetComponent <Camera>();
            controllableCamera = GetComponent <ControllableCamera>();
#if UNITY_EDITOR
            cameraControlMouse = GetComponent <CameraControlMouse>();
#endif
            cameraControlTouch = GetComponent <CameraControlTouch>();
            CameraControl.Detach();
        }
Esempio n. 2
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        if (instance != this)
        {
            Destroy(gameObject);
        }
#if UNITY_EDITOR
        cameraMouse = GetComponent <CameraControlMouse>();
        cameraTouch.Attach();
#endif
        cameraTouch = GetComponent <CameraControlTouch>();
        cameraTouch.Attach();
    }