File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -991,14 +991,21 @@ public HashSet<GameObject> ImplementUpdates(FbxPrefab prefabInstance)
991
991
prefabComponents . RemoveAt ( index ) ;
992
992
993
993
GameObject tempGameObject = new GameObject ( ) ;
994
- Transform tempTransform = tempGameObject . transform ;
994
+ try
995
+ {
996
+
997
+ Transform tempTransform = tempGameObject . transform ;
995
998
996
- UnityEditor . EditorJsonUtility . FromJsonOverwrite ( fbxComponent . jsonValue , tempTransform ) ;
999
+ UnityEditor . EditorJsonUtility . FromJsonOverwrite ( fbxComponent . jsonValue , tempTransform ) ;
997
1000
998
- prefabComponent . gameObject . GetComponent < RectTransform > ( ) . rotation = tempTransform . rotation ;
999
- prefabComponent . gameObject . GetComponent < RectTransform > ( ) . position = tempTransform . position ;
1000
- prefabComponent . gameObject . GetComponent < RectTransform > ( ) . localScale = tempTransform . localScale ;
1001
- GameObject . DestroyImmediate ( tempGameObject ) ;
1001
+ prefabComponent . gameObject . GetComponent < RectTransform > ( ) . rotation = tempTransform . rotation ;
1002
+ prefabComponent . gameObject . GetComponent < RectTransform > ( ) . position = tempTransform . position ;
1003
+ prefabComponent . gameObject . GetComponent < RectTransform > ( ) . localScale = tempTransform . localScale ;
1004
+ }
1005
+ finally
1006
+ {
1007
+ GameObject . DestroyImmediate ( tempGameObject ) ;
1008
+ }
1002
1009
1003
1010
Log ( "updated component {0}:{1}" , nodeName , typeof ( RectTransform ) ) ;
1004
1011
continue ;
You can’t perform that action at this time.
0 commit comments