private TrackerBoss GetTrackerBoss()
 {
     // If boss is not set, try to find a Boss in the scene, if that doesn't work return null.
     if (trackerBoss == null)
     {
         if (sceneBoss == null)
         {
             sceneBoss = FindObjectOfType <TrackerBoss>();
         }
         return(sceneBoss);
     }
     return(trackerBoss);
 }
 void OnValidate()
 {
     if (UseTrackerBoss)
     {
         trackerBoss = FindObjectOfType <TrackerBoss>();
         if (trackerBoss != null)
         {
             trackerIP = trackerBoss.trackerIp;
         }
     }
     else
     {
     }
 }
        static void CreateTrackerBoss()
        {
            if (EditorUtility.DisplayDialog("Do you want to create a new Tracker Boss?", "You can store global properties to use in TrackerTransforms in the scene: \n -- CST Matrix Location \n -- IP Address", "Yes", "No"))
            {
                TrackerBoss instance = GameObject.FindObjectOfType <TrackerBoss>();

                if (instance == null)
                {
                    GameObject  parent      = new GameObject("System Management");
                    GameObject  boss        = new GameObject("TrackerBoss");
                    TrackerBoss trackerBoss = boss.AddComponent(typeof(TrackerBoss)) as TrackerBoss;
                    boss.transform.parent = parent.transform;
                    instance = trackerBoss;
                }
                else
                {
                    Debug.Log("A Tracker Boss already exists!");
                }
            }
        }