Skip to content

Commit bff0fdd

Browse files
authored
Merge pull request #48 from Unity-Technologies/Uni-21772-configure-project-location
Uni-21772 configure unity project location
2 parents a40b4f3 + 25785ef commit bff0fdd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Assets/FbxExporters/Editor/InstallIntegration.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private static string GetModuleTemplatePath(string version)
5050
return result.Replace(VERSION_TAG,version);
5151
}
5252

53-
private static string GetProjectPath()
53+
public static string GetProjectPath()
5454
{
5555
return System.IO.Directory.GetParent(Application.dataPath).FullName;
5656
}
@@ -274,7 +274,8 @@ public static void OnMenuItem ()
274274
if (Integrations.InstallMaya(Integrations.MAYA_VERSION))
275275
{
276276
string title = string.Format("Completed installation of Maya {0} Integration.", Integrations.MAYA_VERSION);
277-
string message = "Please run the following MEL commands to configure auto-loading of the plugin in Maya.\n\nloadPlugin unityOneClickPlugin; pluginInfo -edit -autoload true unityOneClickPlugin;\n";
277+
string commands = string.Format("optionVar -stringValue \"UnityProject\" \"{0}\"; loadPlugin unityOneClickPlugin; pluginInfo -edit -autoload true unityOneClickPlugin;",Integrations.GetProjectPath());
278+
string message = string.Format("Please run the following MEL commands to configure auto-loading of the plugin in Maya.\n\n{0}\n", commands);
278279

279280
EditorUtility.DisplayDialog (title, message, "Ok");
280281
Debug.Log(message);

Assets/FbxExporters/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ else
4545
echo "Maya2017 not installed"
4646
else
4747
# To configure without user interface prepend the following command: optionVar -intValue \"UnityOneClick_Headless\" 1;
48-
"${MAYA_PATH}" -command "optionVar -intValue \"UnityOneClick_Headless\" 1; loadPlugin unityOneClickPlugin; pluginInfo -edit -autoload true unityOneClickPlugin; quit;"
48+
"${MAYA_PATH}" -command "optionVar -stringValue \"UnityProject\" \"${PROJECT_PATH}\"; loadPlugin unityOneClickPlugin; pluginInfo -edit -autoload true unityOneClickPlugin; quit;"
4949
fi
5050
fi
5151

0 commit comments

Comments
 (0)