public static void AssignProCamera2D(BasePC2D target)
        {
            if (target.ProCamera2D == null && Camera.main != null)
                target.ProCamera2D = Camera.main.GetComponent<ProCamera2D>();

            if (target.ProCamera2D == null)
                target.ProCamera2D = FindObjectOfType<ProCamera2D>();
        }
        public static void AssignProCamera2D(BasePC2D target)
        {
            if (target.ProCamera2D == null && Camera.main != null)
            {
                target.ProCamera2D = Camera.main.GetComponent <ProCamera2D>();
            }

            if (target.ProCamera2D == null)
            {
                target.ProCamera2D = FindObjectOfType <ProCamera2D>();
            }
        }
Beispiel #3
0
        public static void AssignProCamera2D(BasePC2D target)
        {
            if (target.ProCamera2D == null && Camera.main != null)
            {
                target.ProCamera2D = Camera.main.GetComponent <ProCamera2D>();
            }

            if (target.ProCamera2D == null)
            {
                target.ProCamera2D = FindObjectOfType <ProCamera2D>();
            }

            if (target.ProCamera2D == null)
            {
                Debug.LogError("No ProCamera2D component found. Please add one to your camera.");
            }
        }