示例#1
0
        public static void AddFormationManager()
        {
            FormationManager exists = (FormationManager)FindObjectOfType <FormationManager>();

            if (!exists)
            {
                GameObject mngr = new GameObject("Formation Manager");

                if (mngr)
                {
                    mngr.transform.position = new Vector3(0, 0, 0);
                    mngr.AddComponent <FormationManager>();
                }
            }
            else
            {
                Debug.LogWarning("A Formation Manager already exists in the Hierarchy");
            }
        }
示例#2
0
 public void OnEnable()
 {
     formationManager = target as FormationManager;
 }