Unity command-line arguments

Source: Internet
Author: User

In general, unity can be started by double-clicking an icon on the desktop or by entering a command line (for example, a MacOS terminal or a Windows CMD window), which will accept commands and information at startup. we can make some gadgets to communicate with unity or invoke unity's methods (such as a one-click Package apk, and a third-party tool to package the resources into package packages).

You can find all the command line parameters in the Holy Scriptures: http://game.ceeger.com/Manual/CommandLineArguments.html.

We are learning the simplest unity command parameters, allowing unity to create an empty project in the F Drive and end the program via the console

C: F:\unitycode\dllcode-batchmode-quit

Explain the meaning of the command line above:

Unity.exe means to start the Unity program
CreateProject Create a Unity project, followed by the created directory
Batchmode Running the Unity program does not eject the Edtior interface
Quit Complete the Unity program after executing the command

Second, using the command line to call Unity we wrote the method to make a package out

The first is the code of our own class written in unity:

 Public classMyeditor:editor {[MenuItem ("Assets/export mypackge")]     Public Static voidmyexportpackge () {//to export a picture into a unitypackage bagAssetdatabase.exportpackage ("Assets/texture/1.png","F:/mypackage.unitypackage", exportpackageoptions.includedependencies); }}

Let's type in the command line (Executemethod class name. Method name executes a method)

C: F: \unitycode\dllcode-quit-batchmode-executemethod myeditor.myexportpackge

And then you can see the exported package under the F-disk.

I'll write it here today (hehe)

Unity command-line arguments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.