This guide will walk you through creating a Linux build of a Unity project and zipping it so that it may be submitted and executed on Unity Simulation Cloud.
For this guide we will be using the RollABall project to walk through the necessary steps of creating a Linux build. You can download a zip of the project by clicking on the green clone or download
button.
Skip to the building section for instructions on creating a build for your own Unity project.
After unzipping the quickstart materials, open the Unity-Simulation-RollABall-master
directory (aka. the Unity project) using Unity. In this example, we open the project using Unity Hub using Unity (version 2018.3.7f1) as shown below.
Once Unity loads the project, open the scene “Roll-a-Ball” as shown below
Click on the play button to play the sample tutorial to ensure that the sample compiles and runs locally on your machine, as shown below.
If you are working on a non Linux OS and would like to ensure that your Linux build executes successfully please follow the local testing guide.
Build a Linux standalone version by navigating to the Build Settings dialog. Make sure that the scene “Roll-a-Ball”, or your target scene if this is a personal project, is selected in the “Scenes In Build”, target platform is “Linux” and Architecture is “x86_64”.
The player settings are setup correctly for this project, but please double check that the settings match those described in the prerequisites section of the Unity Simulation SDK document.
Click on “Build” and save the created output to a directory. For this example we are saving our build as “es_demo” to a directory named “final” as shown below.
You can either zip the build using the CLI or using your own zip utility. We recommend using the Unity Simulation CLI as zipped builds require a specific directory structure to be executed on Unity Simulation.
Create a zipped build of final by navigating to the final
directory where the Linux build was saved and run $ usim zip build . --save-as=unity_simulation_rollaball_tutorial.zip
Once the build has been successfully zipped you will be provided with the option to upload the build.
Successfully zipped unity_simulation_rollaball_tutorial.zip
Would you like to upload the build now? (Y/n)
Enter y
to upload the build to Unity Simulation.
Manually create a zipped build by navigating to the final
directory and running
$ zip -r unity_simulation_rollaball_tutorial.zip .
Note: It is important that when this file is unzipped the exported build files are located at the root. Example build files
- us_demo.x86_64
- us_demo_Data
That is, when zipped its structure should be:
|____ProjectBuildName.zip
| |____ProjectBuildName_Data (the data directory)
| |____ProjectBuildName.x86_64 (the executable)