11using System . Collections . Generic ;
22using NaughtyAttributes ;
3- using NikosAssets . Helpers . Editor ;
43using UnityEngine ;
54using Object = UnityEngine . Object ;
65
@@ -10,35 +9,39 @@ public class EditorUtilitiesSample : BaseNotesMono
109 {
1110 [ BoxGroup ( HelperConstants . ATTRIBUTE_FIELD_BOXGROUP_SETTINGS ) ]
1211 public string fileNameToReplace = "_RENAME_TEST_1" ;
13-
12+
1413 [ BoxGroup ( HelperConstants . ATTRIBUTE_FIELD_BOXGROUP_SETTINGS ) ]
1514 public string desiredFileName = "_RENAME_TEST_2" ;
1615
1716 [ BoxGroup ( HelperConstants . ATTRIBUTE_FIELD_BOXGROUP_SETTINGS ) ]
1817 public bool regenGuidsRecursive = true ;
19-
18+
19+ #if UNITY_EDITOR
2020 [ BoxGroup ( HelperConstants . ATTRIBUTE_FIELD_BOXGROUP_SETTINGS ) ]
21- public GUIDHelper . AcceptedMetaFiles acceptedMetaFilesForGuidRegen = GUIDHelper . AcceptedMetaFiles . Any ;
22-
21+ public Editor . GUIDHelper . AcceptedMetaFiles acceptedMetaFilesForGuidRegen =
22+ Editor . GUIDHelper . AcceptedMetaFiles . Any ;
23+ #endif
24+
2325 [ BoxGroup ( HelperConstants . ATTRIBUTE_FIELD_BOXGROUP_DESCRIPTIONS ) ]
2426 public string pathChosen = "Assets/" ;
2527
2628 [ BoxGroup ( HelperConstants . ATTRIBUTE_FIELD_BOXGROUP_DESCRIPTIONS ) ]
2729 public string scriptClassAndFileName = "GeneratedScriptTest" ;
28-
30+
2931 [ BoxGroup ( HelperConstants . ATTRIBUTE_FIELD_BOXGROUP_DESCRIPTIONS ) ]
3032 public string scriptMethodName = "CallMe" ;
3133
3234 [ BoxGroup ( HelperConstants . ATTRIBUTE_FIELD_BOXGROUP_DESCRIPTIONS ) ]
3335 public Object referenceForGUIDRegen ;
34-
35- #if UNITY_EDITOR
36-
36+
37+ #if UNITY_EDITOR
38+
3739 private void OnDestroy ( )
3840 {
3941 Debug . Log ( this . name + " Mono Destroy: " ) ;
4042 Debug . Log ( "Application.isPlaying: " + Application . isPlaying ) ;
41- Debug . Log ( "EditorUtilitiesHelper.ApplicationIsPlayingAccurate: " + Editor . EditorUtilitiesHelper . ApplicationIsPlayingAccurate ) ;
43+ Debug . Log ( "EditorUtilitiesHelper.ApplicationIsPlayingAccurate: " +
44+ Editor . EditorUtilitiesHelper . ApplicationIsPlayingAccurate ) ;
4245 }
4346
4447 [ Button ( "Pick and save Folder path inside this project" ) ]
@@ -69,7 +72,7 @@ public void LogFilesFromChosenPathRecursive()
6972 [ Button ( "Rename Files at chosen path" ) ]
7073 public void RenameFilesAtChosenPath ( )
7174 {
72- Editor . EditorUtilitiesHelper . RenameFiles ( pathChosen ,
75+ Editor . EditorUtilitiesHelper . RenameFiles ( pathChosen ,
7376 fileNameToReplace , desiredFileName ) ;
7477 }
7578
@@ -78,7 +81,6 @@ public void RegenerateGUIDsAtChosenPathRecursive()
7881 {
7982 Editor . GUIDHelper . RegenerateGuids ( pathChosen , regenGuidsRecursive , acceptedMetaFilesForGuidRegen ) ;
8083 }
81-
82- #endif
84+ #endif
8385 }
8486}
0 commit comments