Skip to content

Commit 85959b2

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into UNI-21177-convert-default-selection-behavior
# Conflicts: # Assets/FbxExporters/Editor/ConvertToModel.cs
2 parents 6da09a5 + 86bb708 commit 85959b2

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

Assets/FbxExporters/Editor/ConvertToModel.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,9 @@ private static List<GameObject> OnConvertInPlace ()
110110
{
111111
GameObject unityGO = unityObj as GameObject;
112112

113-
// configure name
114-
const string cloneSuffix = "(Clone)";
115-
116-
if (unityGO.name.EndsWith (cloneSuffix, System.StringComparison.CurrentCulture)) {
117-
unityGO.name = unityGO.name.Remove (cloneSuffix.Length - 1);
118-
}
113+
// Set the name to be the name of the instantiated asset.
114+
// This will get rid of the "(Clone)" if it's added
115+
unityGO.name = unityMainAsset.name;
119116

120117
// configure transform and maintain local pose
121118
unityGO.transform.SetParent (unityCommonAncestors[i], false);

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ export PROJECT_PATH=~/Development/FbxExporters
2020
export UNITY3D_PATH=/Applications/Unity\ 5.6.1f1/Unity.app/Contents/MacOS/Unity
2121
export PACKAGE_NAME=FbxExporters
2222
export PACKAGE_VERSION=0.0.3a
23+
export FBXSDK_PACKAGE_PATH=/path/to/FbxSdk.unitypackage
2324
24-
"${UNITY3D_PATH}" -batchmode -projectPath "${PROJECT_PATH}" -exportPackage Assets/FbxExporters ${PROJECT_PATH}/${PACKAGE_NAME}_${PACKAGE_VERSION}.unitypackage -quit
25+
"${UNITY3D_PATH} -projectPath "${PROJECT_PATH}" -importPackage ${FBXSDK_PACKAGE_PATH} -quit
26+
"${UNITY3D_PATH}" -batchmode -projectPath "${PROJECT_PATH}" -exportPackage Assets/FbxExporters Assets/FbxSdk ${PROJECT_PATH}/${PACKAGE_NAME}_${PACKAGE_VERSION}.unitypackage -quit
27+
```
28+
29+
**On Windows**
30+
31+
```
32+
set PROJECT_PATH=/path/to/FbxExporters
33+
set UNITY3D_PATH="C:/Program Files/Unity/Editor/Unity.exe"
34+
set PACKAGE_NAME=FbxExporters
35+
set PACKAGE_VERSION=0.0.3a
36+
set FBXSDK_PACKAGE_PATH=/path/to/FbxSdk.unitypackage
37+
38+
%UNITY3D_PATH% -projectPath "%PROJECT_PATH%" -importPackage %FBXSDK_PACKAGE_PATH% -quit
39+
%UNITY3D_PATH% -batchmode -projectPath "%PROJECT_PATH%" -exportPackage Assets/FbxExporters Assets/FbxSdk %PROJECT_PATH%/%PACKAGE_NAME%_%PACKAGE_VERSION%.unitypackage -quit
2540
```

0 commit comments

Comments
 (0)