@@ -13,12 +13,15 @@ private static GameObject FindRoot(string name)
1313 {
1414 GameObject root = GameObject . Find ( name ) ;
1515 if ( root == null )
16+ {
1617 root = new GameObject ( name ) ;
18+ root . tag = EDITOR_NAME_TAG ;
19+ }
1720 return root ;
1821 }
1922
2023 #region CreateLazyNote
21- [ MenuItem ( "GameObject/" + ASSET_SHORT_NAME + "/Create " + nameof ( LazyNote ) + "with arrow" ) ]
24+ [ MenuItem ( "GameObject/" + ASSET_SHORT_NAME + "/Create " + nameof ( LazyNote ) + " with arrow" ) ]
2225 public static void CreateLazyNoteWithArrow ( MenuCommand menuCommand )
2326 {
2427 GameObject go = CreateLazyNoteInternal ( menuCommand ) ;
@@ -34,6 +37,7 @@ public static void CreateLazyNote(MenuCommand menuCommand)
3437 private static GameObject CreateLazyNoteInternal ( MenuCommand menuCommand )
3538 {
3639 GameObject go = new GameObject ( nameof ( LazyNote ) ) ;
40+ go . tag = EDITOR_NAME_TAG ;
3741 go . AddComponent < LazyNote > ( ) ;
3842 GameObjectUtility . SetParentAndAlign ( go , menuCommand . context as GameObject ) ;
3943 if ( go . transform . parent == null )
@@ -44,7 +48,7 @@ private static GameObject CreateLazyNoteInternal(MenuCommand menuCommand)
4448 #endregion
4549
4650 #region CreateNote
47- [ MenuItem ( "GameObject/" + ASSET_SHORT_NAME + "/Create " + nameof ( Note ) + "with arrow" ) ]
51+ [ MenuItem ( "GameObject/" + ASSET_SHORT_NAME + "/Create " + nameof ( Note ) + " with arrow" ) ]
4852 public static void CreateNoteWithArrow ( MenuCommand menuCommand )
4953 {
5054 GameObject go = CreateNoteInternal ( menuCommand ) ;
@@ -60,6 +64,7 @@ public static void CreateNote(MenuCommand menuCommand)
6064 private static GameObject CreateNoteInternal ( MenuCommand menuCommand )
6165 {
6266 GameObject go = new GameObject ( nameof ( Note ) ) ;
67+ go . tag = EDITOR_NAME_TAG ;
6368 go . AddComponent < Note > ( ) ;
6469 GameObjectUtility . SetParentAndAlign ( go , menuCommand . context as GameObject ) ;
6570 if ( go . transform . parent == null )
0 commit comments