예제 #1
0
 private void Awake()
 {
     if (_singleton != null)
     {
         Debug.LogError("more than one LineDrawTool present");
     }
     _singleton = this;
 }
예제 #2
0
        public static void EnsureExistance()
        {
            if (_singleton != null)
            {
                return;
            }

            GameObject go = new GameObject("line_draw_tool");

            _singleton   = go.AddComponent <LineDrawTool>();
            go.hideFlags = HideFlags.DontSave;
        }