@@ -17,30 +17,30 @@ private enum SortMode
1717 ByIconName
1818 }
1919
20- [ MenuItem ( "Tools/Block Library 🧱 " ) ]
20+ [ MenuItem ( "Tools/Gid Level Editor/Block Window " ) ]
2121 public static void ShowWindow ( )
2222 {
2323 var window = GetWindow < BlockLibraryWindow > ( false , "Block Library" , true ) ;
2424 window . minSize = new Vector2 ( 400 , 500 ) ;
2525 }
2626
27- [ BoxGroup ( "📦 Block Library" , centerLabel : true ) ] [ ReadOnly , ShowInInspector , HideLabel ]
27+ [ BoxGroup ( "Block Library" , centerLabel : true ) ] [ ReadOnly , ShowInInspector , HideLabel ]
2828 private BlockLibrary _blockLibrary ;
2929
30- [ BoxGroup ( "🧱 Create Block" , centerLabel : true ) ] [ ShowInInspector , LabelText ( "Block ID" ) ]
30+ [ BoxGroup ( "Create Block" , centerLabel : true ) ] [ ShowInInspector , LabelText ( "Block ID" ) ]
3131 [ GUIColor ( 0.2f , 0.8f , 0.2f ) ]
3232 private string _newBlockId = "" ;
33- [ BoxGroup ( "🧱 Create Block" ) ] [ ShowInInspector , LabelText ( "Icon" ) ]
33+ [ BoxGroup ( "Create Block" ) ] [ ShowInInspector , LabelText ( "Icon" ) ]
3434 [ GUIColor ( 0.2f , 0.8f , 0.2f ) ]
3535 private Sprite _newBlockSprite ;
36- [ BoxGroup ( "🧱 Create Block" ) ] [ ShowInInspector , LabelText ( "Prefab" ) ]
36+ [ BoxGroup ( "Create Block" ) ] [ ShowInInspector , LabelText ( "Prefab" ) ]
3737 [ GUIColor ( 0.2f , 0.8f , 0.2f ) ]
3838 private GameObject _newBlockPrefab ;
3939
40- [ BoxGroup ( "🔍 Search & Sort" , centerLabel : true ) ] [ ShowInInspector , LabelText ( "Filter" ) ]
40+ [ BoxGroup ( "Search & Sort" , centerLabel : true ) ] [ ShowInInspector , LabelText ( "Filter" ) ]
4141 private string _searchFilter = "" ;
42- [ BoxGroup ( "🔍 Search & Sort" ) ]
43- [ HorizontalGroup ( "🔍 Search & Sort/SortRow" ) ]
42+ [ BoxGroup ( "Search & Sort" ) ]
43+ [ HorizontalGroup ( "Search & Sort/SortRow" ) ]
4444 [ EnumToggleButtons , HideLabel , PropertyOrder ( 0 ) ]
4545 [ SerializeField ]
4646 private SortMode _sortMode = SortMode . ByID ;
@@ -64,10 +64,7 @@ protected override void DrawEditor(int index)
6464 {
6565 SirenixEditorGUI . ErrorMessageBox ( "No BlockLibrary asset found." ) ;
6666 if ( GUILayout . Button ( "Create BlockLibrary" ) )
67- {
6867 CreateLibrary ( ) ;
69- }
70-
7168 return ;
7269 }
7370
@@ -108,14 +105,14 @@ private void CreateLibrary()
108105 AssetDatabase . Refresh ( ) ;
109106
110107 _blockLibrary = asset ;
111- Debug . Log ( "✅ BlockLibrary created at " + path ) ;
108+ Debug . Log ( "BlockLibrary created at " + path ) ;
112109 }
113110
114111 private void DrawSelectedBlockSection ( )
115112 {
116113 SirenixEditorGUI . BeginBox ( ) ;
117114 SirenixEditorGUI . BeginBoxHeader ( ) ;
118- SirenixEditorGUI . Title ( "🎯 Selected Block" , null , TextAlignment . Center , true ) ;
115+ SirenixEditorGUI . Title ( "Selected Block" , null , TextAlignment . Center , true ) ;
119116 SirenixEditorGUI . EndBoxHeader ( ) ;
120117
121118 if ( _selectedBlock == null )
@@ -132,16 +129,15 @@ private void DrawSelectedBlockSection()
132129 EditorGUILayout . EndHorizontal ( ) ;
133130
134131 GUILayout . Space ( 8 ) ;
135-
136- // Поля редактирования DTO
132+
137133 _blockDraft . Id = EditorGUILayout . TextField ( "ID" , _blockDraft . Id ) ;
138134 _blockDraft . Icon = ( Sprite ) EditorGUILayout . ObjectField ( "Icon" , _blockDraft . Icon , typeof ( Sprite ) , false ) ;
139135 _blockDraft . Prefab =
140136 ( GameObject ) EditorGUILayout . ObjectField ( "Prefab" , _blockDraft . Prefab , typeof ( GameObject ) , false ) ;
141137
142138 GUILayout . Space ( 4 ) ;
143139
144- if ( GUILayout . Button ( "💾 Apply Changes" , GUILayout . Height ( 25 ) ) )
140+ if ( GUILayout . Button ( "Apply Changes" , GUILayout . Height ( 25 ) ) )
145141 {
146142 _blockDraft . ApplyTo ( _selectedBlock ) ;
147143 }
@@ -150,7 +146,7 @@ private void DrawSelectedBlockSection()
150146 SirenixEditorGUI . EndBox ( ) ;
151147 }
152148
153- [ HorizontalGroup ( "🔍 Search & Sort/SortRow" , width : 25 ) ]
149+ [ HorizontalGroup ( "Search & Sort/SortRow" , width : 25 ) ]
154150 [ Button ( "@_sortAscending ? \" ▲\" : \" ▼\" " , ButtonSizes . Medium ) ]
155151 [ PropertyOrder ( 1 ) ]
156152 private void ToggleSortDirection ( ) => _sortAscending = ! _sortAscending ;
@@ -159,7 +155,7 @@ private void DrawExistingBlocks()
159155 {
160156 SirenixEditorGUI . BeginBox ( ) ;
161157 SirenixEditorGUI . BeginBoxHeader ( ) ;
162- SirenixEditorGUI . Title ( "📦 Existing Blocks" , null , TextAlignment . Center , true ) ;
158+ SirenixEditorGUI . Title ( "Existing Blocks" , null , TextAlignment . Center , true ) ;
163159 SirenixEditorGUI . EndBoxHeader ( ) ;
164160
165161 if ( _blockLibrary . AllBlocks == null || _blockLibrary . AllBlocks . Count == 0 )
@@ -172,9 +168,7 @@ private void DrawExistingBlocks()
172168 var blocks = new List < BlockDataEditor > ( _blockLibrary . AllBlocks ) ;
173169
174170 if ( ! string . IsNullOrEmpty ( _searchFilter ) )
175- {
176171 blocks = blocks . FindAll ( b => b != null && b . ID . ToLower ( ) . Contains ( _searchFilter . ToLower ( ) ) ) ;
177- }
178172
179173 blocks . Sort ( ( a , b ) =>
180174 {
@@ -193,7 +187,8 @@ private void DrawExistingBlocks()
193187
194188 foreach ( var block in blocks )
195189 {
196- if ( block == null ) continue ;
190+ if ( block == null )
191+ continue ;
197192
198193 SirenixEditorGUI . BeginBox ( ) ;
199194 SirenixEditorGUI . BeginBoxHeader ( ) ;
@@ -248,9 +243,9 @@ private void DrawExistingBlocks()
248243 SirenixEditorGUI . EndBox ( ) ;
249244 }
250245
251- [ BoxGroup ( "🧱 Create Block" ) ]
246+ [ BoxGroup ( "Create Block" ) ]
252247 [ GUIColor ( 0.2f , 0.8f , 0.2f ) ]
253- [ Button ( "🚀 Create New Block" , ButtonSizes . Large ) ]
248+ [ Button ( "Create New Block" , ButtonSizes . Large ) ]
254249 [ EnableIf ( "@!string.IsNullOrEmpty(_newBlockId) && _newBlockSprite != null" ) ]
255250 private void CreateNewBlock ( )
256251 {
@@ -273,7 +268,7 @@ private void CreateNewBlock()
273268 EditorUtility . SetDirty ( _blockLibrary ) ;
274269 AssetDatabase . SaveAssets ( ) ;
275270
276- Debug . Log ( $ "✅ Created new block: { _newBlockId } ") ;
271+ Debug . Log ( $ "Created new block: { _newBlockId } ") ;
277272 }
278273
279274 private int SafeCompare ( UnityEngine . Object a , UnityEngine . Object b )
0 commit comments