@@ -34,7 +34,7 @@ echo "Using PACKAGE_PATH=${PACKAGE_PATH}"
34
34
35
35
# Configure where Maya is installed
36
36
if [ ! -d " ${MAYA_LOCATION} " ]; then
37
- MAYA_LOCATION=/Applications/Autodesk/maya2017/Maya.app
37
+ MAYA_LOCATION=/Applications/Autodesk/maya2017/Maya.app/Contents
38
38
fi
39
39
echo " Using MAYA_LOCATION=${MAYA_LOCATION} "
40
40
@@ -43,26 +43,32 @@ if [ ! -f "${UNITY_EDITOR_PATH}" ]; then
43
43
exit -1
44
44
fi
45
45
46
+ # remove existing installation
47
+ if [ -d " ${PROJECT_PATH} /Assets/FbxExporters" ]; then
48
+ echo " Uninstalling previous version"
49
+ rm -rf " ${PROJECT_PATH} /Assets/FbxExporters"
50
+ fi
51
+
46
52
# Install FbxExporters package
47
53
" ${UNITY_EDITOR_PATH} " -projectPath " ${PROJECT_PATH} " -importPackage ${PACKAGE_PATH} -quit
48
54
49
55
# Install Maya Integration
50
56
" ${UNITY_EDITOR_PATH} " -batchMode -projectPath " ${PROJECT_PATH} " -executeMethod FbxExporters.Integrations.InstallMaya -quit
51
57
52
58
# Configuring Maya2017 to auto-load integration
53
- MAYA_PATH=${MAYA_LOCATION} /Contents/ bin/maya
59
+ MAYA_PATH=${MAYA_LOCATION} /bin/maya
54
60
55
61
if [ ! -f " ${MAYA_PATH} " ]; then
56
62
echo " Maya not installed at ${MAYA_PATH} "
57
63
else
58
64
# Configure Maya Integration
59
65
TEMP_SAVE_PATH=" _safe_to_delete"
60
- EXPORT_SETTINGS_PATH=" Integrations/Autodesk/maya/scripts/unityFbxExportSettings.mel"
66
+ EXPORT_SETTINGS_PATH=" FbxExporters/ Integrations/Autodesk/maya/scripts/unityFbxExportSettings.mel"
61
67
MAYA_INSTRUCTION_PATH=" _safe_to_delete/_temp.txt"
62
68
HEADLESS=1
63
69
64
70
# NOTE: we need start Maya in UI mode so that we can correctly configure the auto-load of the plugin.
65
71
" ${MAYA_PATH} " -command " configureUnityOneClick \" ${PROJECT_PATH} \" \" ${UNITY_EDITOR_PATH} \" \" ${TEMP_SAVE_PATH} \" \" ${EXPORT_SETTINGS_PATH} \" \" ${MAYA_INSTRUCTION_PATH} \" ${HEADLESS} ; scriptJob -idleEvent quit;"
66
72
fi
67
73
68
- exit 0
74
+ exit 0
0 commit comments