- Check out the
sim-integration
branch. This branch includes code that integrates with the Game Simulation package, which is also included in the branch. - Get whitelisted for Unity Game Simulation by using this form. In the section that asks "In a few words, what interests you about Unity Game Simulation" please put "Unity Game Simulation for Coronavirus", the team will reach out to you via email once you've been granted access. Game Simulation is currently in beta, and requires your Unity Organization to be whitelisted to use it.
- In order to use Unity Game Simulation, you must enable services in the Unity project. Click on Window -> General -> Services to open the services window.
- Select your organization.
- Click on the settings tab and make sure there is a project ID.
Normally, you would use the Game Simulation Editor Window to set up your simulation parameters, but for convenience, we've included a .csv
file will the parameters we used to get you started.
- Open the Game Simulation window by going to Window -> Game Simulation. Click on the tab called Parameter Set Up. This will create the environment in Remote Config that Game Simulation will use when running in the cloud. Close the Game Simulation Editor window.
- Find the
.csv
file in thesim-integration
branch. - Go to the Remote Config Dashboard.
- Find your project in the project list and click on it.
- You should see a table with your GameSim config. Click the View button.
- Click Default Config.
- At the top of the config table, to the right of the search bar, click the three dots, and select Upload CSV, and select the
.csv
file from the first step. - In Unity, open the Game Simulation window again, and verify that the parameters from the
.csv
file are visibile. If the window is already open, close and reopen the window to see the parameters.
- In the Game Simulation Editor window, click the Build Upload tab.
- Click the checkbox next to the "UnityFarmsMarket" scene.
- Give your build a name in the build name text box.
- Click Build and Upload.
- Go to the Game Simulation Dashboard, and find and click on your project.
- Click the Create Simulation button.
- Give your simulation a name.
- Select the build you just uploaded from the dropdown. You may notice your build says "Verification in Progress", if that's the case, wait about 5-10 minutes for the verification to be completed before proceeding. This ensures that your build is properly configured for Game Simulation. If you see "Verification Failed" please contact us at gamesimulation@unity3d.com.
- In the parameters table, enter the different values for the parameters that you'd like to run. You can enter multiple values to run by using a comma to separate them.
- Set the number of times you'd like each parameter combination to run.
- Click Run.
With the default value for the SimulationTimeInSeconds
parameter, the simulation will run for about five minutes. Check back in about 10 minutes to see if your simulation is complete. Once the simulation is complete, you can download the results from the simulation overview page.
Play around with different values for the parameters and see how the results change.
You can also add new parameters by using the Game Simulation Editor window. Make sure to instrument the new parameters in the StoreSimulation
class.