Example #1
0
        public override void OnInspectorGUI()
        {
            if (_grid.transform.hasChanged)
            {
                _grid.transform.localScale    = Vector3.one;
                _grid.transform.localRotation = Quaternion.identity;
            }

            GUI.enabled = !Application.isPlaying;
            DrawDefaultInspector();
            if (GUILayout.Button("Refresh"))
            {
                FuncEditor.RefreshGrid(_grid);
            }
            if (GUILayout.Button("Reset childs"))
            {
                FuncEditor.RefreshGrid(_grid);
                foreach (Core.Cell c in _grid.GetComponentsInChildren <Core.Cell>())
                {
                    c.ResetTransform();
                }
            }
            GUI.enabled = true;
            if (GUILayout.Button("Show tools window"))
            {
                MapTileGridCreatorWindow.OpenWindows();
            }
        }