File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -989,7 +989,15 @@ public HashSet<GameObject> ImplementUpdates(FbxPrefab prefabInstance)
989
989
prefabComponent = prefabXfo . gameObject . AddComponent ( fbxComponent . t ) ;
990
990
Log ( "created component {0}:{1}" , nodeName , fbxComponent . t ) ;
991
991
}
992
-
992
+ // Check that the component exists before copying to it.
993
+ // This happens for Rect Transform components as the fbx
994
+ // contains a Transform which it tries to add/update on the
995
+ // prefab, but fails because you cannot have both a Transform
996
+ // and a Rect Transform
997
+ // UNI-29179 TODO: better handling of Rect Transforms
998
+ if ( ! prefabComponent ) {
999
+ continue ;
1000
+ }
993
1001
// Now set the values.
994
1002
UnityEditor . EditorJsonUtility . FromJsonOverwrite ( fbxComponent . jsonValue , prefabComponent ) ;
995
1003
}
You can’t perform that action at this time.
0 commit comments