Skip to content

Commit 73602dc

Browse files
committed
get relative and absolute asset paths
1 parent 96db585 commit 73602dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Assets/FbxExporters/Editor/ConvertToModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ public static GameObject[] CreateInstantiatedModelPrefab (
9292
// don't re-export fbx
9393
// create prefab out of model instance in scene, link to existing fbx
9494
var mainAsset = PrefabUtility.GetPrefabParent(go) as GameObject;
95-
SetupFbxPrefab(go, mainAsset, AssetDatabase.GetAssetOrScenePath(mainAsset), AssetDatabase.GetAssetOrScenePath(mainAsset));
95+
var mainAssetRelPath = AssetDatabase.GetAssetOrScenePath(mainAsset);
96+
var mainAssetAbsPath = Directory.GetParent(Application.dataPath) + "/" + mainAssetRelPath;
97+
SetupFbxPrefab(go, mainAsset, mainAssetRelPath, mainAssetAbsPath);
9698
continue;
9799
}
98100
}

0 commit comments

Comments
 (0)