Exemplo n.º 1
0
 // 更新选中的新物体
 private void OnSelectionChange()
 {
     if (Selection.activeTransform != null)
     {
         TileObjects = Selection.activeTransform.GetComponent <TileObjects>();
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Debug.Log("Warning: multiple " + this + " in scene!");
     }
     FillDictionary();
 }
Exemplo n.º 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>();
            }
        }
Exemplo n.º 4
0
 // 获得编辑器脚本
 private void OnEnable()
 {
     TileObjects = (global::TileObjects)target;
 }
Exemplo n.º 5
0
 private void Awake()
 {
     Instance = this;
 }