File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,29 @@ public override void OnInspectorGUI() {
180
180
}
181
181
EditorGUI . EndDisabledGroup ( ) ;
182
182
183
+ EditorGUILayout . Space ( ) ;
184
+
185
+ EditorGUI . indentLevel -- ;
186
+ EditorGUILayout . LabelField ( "Repair Missing Scripts" , EditorStyles . boldLabel ) ;
187
+ EditorGUI . indentLevel ++ ;
188
+
189
+ EditorGUILayout . Space ( ) ;
190
+
191
+ var repairMissingScripts = new GUIContent (
192
+ "Repair Missing Scripts" ,
193
+ "Repair missing FbxPrefab scripts in text assets" ) ;
194
+ if ( GUILayout . Button ( repairMissingScripts ) ) {
195
+ bool result = FbxExporters . Editor . RepairMissingScripts . ReplaceGUIDInTextAssets ( ) ;
196
+ if ( result ) {
197
+ UnityEditor . EditorUtility . DisplayDialog ( "Finished Repairing Scripts" ,
198
+ "Repaired missing scripts in text serialized assets" , "Ok" ) ;
199
+ } else {
200
+ UnityEditor . EditorUtility . DisplayDialog ( "Finished Repairing Scripts" ,
201
+ "Couldn't find any assets needing repair" , "Ok" ) ;
202
+ }
203
+ }
204
+
205
+
183
206
GUILayout . FlexibleSpace ( ) ;
184
207
GUILayout . EndScrollView ( ) ;
185
208
GUILayout . EndVertical ( ) ;
Original file line number Diff line number Diff line change @@ -38,13 +38,7 @@ private static string CurrentPackageSearchID {
38
38
}
39
39
}
40
40
41
- [ MenuItem ( "File/Repair Missing Scripts" , false ) ]
42
- public static void Menu ( )
43
- {
44
- ReplaceGUIDInTextAssets ( ) ;
45
- }
46
-
47
- private static bool ReplaceGUIDInTextAssets ( )
41
+ public static bool ReplaceGUIDInTextAssets ( )
48
42
{
49
43
// search project for assets containing old GUID
50
44
You can’t perform that action at this time.
0 commit comments