Skip to content

Commit 231c0e5

Browse files
committed
handle missing components
1 parent 84f875c commit 231c0e5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/FbxExporters/Editor/ConvertToModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,10 @@ public static void CopyComponents(GameObject from, GameObject to){
400400
}
401401

402402
var json = EditorJsonUtility.ToJson(component);
403+
if (string.IsNullOrEmpty (json)) {
404+
// this happens for missing scripts
405+
continue;
406+
}
403407

404408
System.Type expectedType = component.GetType();
405409
Component toComponent = null;

0 commit comments

Comments
 (0)