// Use this for initialization protected override void Start() { base.Start(); if (Camera2D == null) { Camera2D = GameObject.FindObjectOfType <Camera2DController>(); } m_camera2DFollowBehaviour = Camera2D.transform.GetComponent <FollowObjectBehaviour>(); m_camera2DFollowBehaviour.Target = transform; }
// Use this for initialization protected override void Start () { base.Start(); if( Camera2D == null ) { Camera2D = GameObject.FindObjectOfType<Camera2DController>(); } m_camera2DFollowBehaviour = Camera2D.transform.GetComponent<FollowObjectBehaviour>(); m_camera2DFollowBehaviour.Target = transform; }