Example #1
0
 // 更新选中的新物体
 private void OnSelectionChange()
 {
     if (Selection.activeTransform != null)
     {
         TileObjects = Selection.activeTransform.GetComponent <TileObjects>();
     }
 }
Example #2
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Debug.Log("Warning: multiple " + this + " in scene!");
     }
     FillDictionary();
 }
Example #3
0
        private static void ShowWindow()
        {
            // 定制窗口的一些信息
            var window = GetWindow <TileWnd>();

            window.titleContent = new GUIContent("Tile Editor");
            window.Show();

            // 选中带有TileObject脚本实例的TileObjects实例
            if (Selection.activeTransform != null)
            {
                TileObjects = Selection.activeTransform.GetComponent <TileObjects>();
            }
        }
Example #4
0
 // 获得编辑器脚本
 private void OnEnable()
 {
     TileObjects = (global::TileObjects)target;
 }
Example #5
0
 private void Awake()
 {
     Instance = this;
 }