hi , I am trying to use unity 3d to enable viewing of a catalog of 3dsmax and maya models .
Is there any batch tools or batch processes I can use to iteratively create a unity3d file for each model file ?
hi , I am trying to use unity 3d to enable viewing of a catalog of 3dsmax and maya models .
Is there any batch tools or batch processes I can use to iteratively create a unity3d file for each model file ?
Welcome to the forums! ![]()
I don’t believe that there are any off-the-shelf tools for you to do this, but you can definitely use Unity’s command line abilities to help (requires Pro). They let you launch Unity via a command line call, call helper functions (perhaps to make a basic scene) and then you can publish builds. All quite useful!
thanks.
I have the trial version 2.5.1 .
Can you give me some example of the the batch tools ?
What batch tools are there ? What can done with them ?
Any example usages ?
Also , i am looking for batch tools to import assets and then batch repair the materials . Is there any such tools ? Or can I develop script for that purpose.
If scripting is possible, can I run the script in batch mode without any GUI ?
Batch Tools means call the editor through command line to execute a specific script
the rest is all scripting as with the asset import related functions etc depending on the exact thing you want to do.
how about the command line tools ? where can I get some info about the commmand line tools ? Thanks all for answering my questions ![]()
Read about 'em here:
There is a switch call importPackage
-importPackage packagename
Force import the package given. No import dialog is shown.
What is a package ?
A package is basically a “zipped up unity project part”. That can be textures, shaders, materials, game objects as well as configures materials with textures and whole prefabs.
they are imported into the project to be then used in the project.
the documentation contains more information
thanks dreamora !
A different question now :
where is the “Editor” folder for the switch -executeMethod ClassName.MethodName ? I am getting
executeMethod class MyEditorScript.PerformBuild could not be found.
Aborting batchmode due to failure:
m_IDListHandle != 0 (Filename: c:\builds\unity-branches-2.5.x\unity-2.5.x\runtim
e\gui\GUIState.h Line: 19)
I tried the C:\program files\Unity\Editor and also an “Editor” folder under my project folder as follow:
“C:\program files\Unity\Editor\Unity.exe” -quit -batchmode -compressTextures -createProject “c:\temp\U3D\autoproj2” -executeMethod MyEditorScript.PerformBuild
The MyEditorScript class is as follow:
using namespace UnityEditor;
using System.Collections;
public class MyEditorScript
{
public static void PerformBuild()
{
//string[] scenes = {"Assets/MyScene.unity"};
EditorApplication.NewScene();
EditorApplication.SaveScene("Assets/MyScene.unity");
BuildPipeline.BuildPlayer(scenes);
}
}
also is there a complete listing of all the command line switches ?
Is there a -openProject switch ? Or how to open a project using commmand line …
editor scripts must be in the editor folder within the assets folder of the project.
also command line scripts can’t base on UI to be present as it won’t be.
Is it under my_project_folder\Editor , or is it my_project_folder\Assets\Editor ? Also do I need to compile the .cs file into a DLL file ?
I am using a trial version of unity 3d … do I need a licensed Pro version to test the command line switches ? This is critical because without a successful test result (from me or somebody else) , I cannot convince my company to purchase Pro licenses.
all scripts must be in the assets folder at very least, editor scripts especially in the assets\editor folder.
scripts in the assets folder are automatically compiled