Skip to content

Commit 844045a

Browse files
committed
support 2018.1 and 2018.2 api changes
1 parent 9539f35 commit 844045a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/com.unity.formats.fbx/Editor/Scripts/FbxExporter.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,11 @@ protected bool ExportInstance (GameObject unityGo, FbxNode fbxNode, FbxScene fbx
12891289
if (unityPrefabType != PrefabType.PrefabInstance &&
12901290
unityPrefabType != PrefabType.ModelPrefabInstance) return false;
12911291

1292+
#if UNITY_2018_2_OR_NEWER
12921293
Object unityPrefabParent = PrefabUtility.GetCorrespondingObjectFromSource (unityGo);
1294+
#else
1295+
Object unityPrefabParent = PrefabUtility.GetPrefabParent (unityGo);
1296+
#endif
12931297

12941298
if (Verbose)
12951299
Debug.Log (string.Format ("exporting instance {0}({1})", unityGo.name, unityPrefabParent.name));

0 commit comments

Comments
 (0)