Example #1
0
    /// <summary>
    /// MonoBehaviour method called on GameObject by Unity during initialization phase.
    /// </summary>
    void Start()
    {
        CameraCtrl _cameraCtrl = this.gameObject.GetComponent <CameraCtrl>();

        if (_cameraCtrl != null)
        {
            if (photonView.IsMine)
            {
                _cameraCtrl.OnStartFollowing();
            }
        }
        else
        {
            Debug.LogError("<Color=Red><a>Missing</a></Color> CameraWork Component on playerPrefab.", this);
        }
    }