|Unity Cloud Dashboard||Use the Unity Cloud Dashboard to create and test scripts. You can access other Unity Gaming Services from the same place, such as Remote Config.|
|Unity Editor||Use the Unity Editor to write, test and bundle scripts. You can integrate with the deployment window, automate your workflow and deploy Cloud Code alongside other Unity services.|
|Unity Gaming Services CLI||Use the CLI to deploy and manage scripts from the command line. Deploy multiple Unity service configurations at once, and integrate with CI/CD.|
The following process details a typical development cycle:
- Create a script. Create a Cloud Code script through the Unity Cloud Dashboard and add custom parameters.
- Test and debug. Select Run on the dashboard and test the result of your function. Use the provided test players to validate the interaction with other services or add logging statements to debug issues. For more information, refer to the page on how to Test run the script.
- Publish the script. Select Publish to make the script available to the game client. This is the main mechanism for adding live updates on scripts, which immediately display in the game.
- Integrate the script with your project. Import the Cloud Code SDK into your game and call your script from Unity runtime. You can run the script with the REST API, or from a Multiplay server.
Example use cases
You can write a lot of your game logic with Cloud Code. For example, you can connect to different services from within scripts. To understand how to connect to services and how it works as a game mechanic, you can explore the use cases. The examples include server time anti-cheat mechanisms, in-game coupons, and daily rewards.
Learn about the fundamental concepts of Cloud Code scripts:
|Create a script||Learn how to create a script.|
|Script structure||Understand the structure of a script.|
|Write scripts||Learn how to write scripts using the Unity Cloud Dashboard, UGS CLI, REST API or the Unity Editor.|
|Run scripts||Learn how to run scripts from Unity runtime, with REST API or from a Multiplay server.|
|Test run the script||Learn how to test your script.|
|Error handling||Learn how handle errors in your scripts.|
|Logging||Learn how to use logging to debug your script.|
Improve your workflow
To streamline the development and deployment of your scripts, you can automate the process:
|Integrate with CI/CD||Integrate the deployment of your script with your CI/CD pipeline.|
|Integrate with Unity Editor||Learn how to write, test and bundle scripts in the Unity Editor.|
You can integrate modules with other Unity Gaming Services and any external services, and access cross-player data.
|Authentication||Learn how to authenticate your game client with Cloud Code.|
|Service and access token support||Learn how to use service and access tokens to authenticate your scripts.|
|Available libraries||Find the available UGS SDKs for with Cloud Code scripts.|
|Access control||Learn how to control access and prevent unwanted usage.|
|Integrate with Unity Services||Learn about how to connect Cloud Code to other Unity services.|
|Integrate with external services||Learn how to integrate with external services.|
|Interact with cross-player data||Learn how to access and update data for other players.|
|Triggers||Learn how to use triggers to automate server side actions.|