Cloud Code is a serverless compute service that allows you to write and run code in the cloud. You can use Unity's Cloud Code to write stateless server-side code on a fully managed infrastructure. Cloud Code is a fully managed service that automatically scales to meet your traffic demands. You can focus on the development of your game logic and isolate it from the client to prevent cheating.
Cloud Code is fully compatible to integrate with other Unity services, such as Remote Config, Cloud Save, Economy and Leaderboards.
Use Cloud Code with other Unity services to create a complete game backend, and to deploy solutions such as in-game economy, storage for player data, and dynamic settings configuration, while you keep your game logic secure.
Cloud Code C# modules cannot use classes from the UnityEngine
namespace or anything else in the Unity's scripting API. This is because Cloud Code uses the open-source .NET runtime. This is separate from the Unity runtime and does not rely on any of its scripting backends.
The following tutorials show how you can use Cloud Code triggers in combination with other UGS products for specific outcomes.
Note: For more advanced sample projects, you can refer to the UGS use cases sample project.
Use Cloud Code with modules and scripts#To call Cloud Code from games, you can use integrated Unity SDKs or use the Cloud Code Client API if you need to work outside of Unity Editor.
Cloud Code supports two types of code: Cloud Code C# modules and Cloud Code JavaScript scripts.
We recommend C# modules to get the most out of Cloud Code, as our Best practices documentation highlights several key benefits.
To choose which method fits your needs, review the following outline .
Cloud Code C# modules cannot use classes from the UnityEngine
namespace or anything else in the Unity's scripting API. This is because Cloud Code uses the open-source .NET runtime. This is separate from the Unity runtime and does not rely on any of its scripting backends.
There are multiple ways to integrate and manage your application with Cloud Code:
Interface Support Description Usage Cloud Code SDK Scripts and modules. A software development kit (SDK) to integrate your Unity project with Cloud Code. Use the SDK to call module endpoints or to call scripts from Unity runtime. Unity Dashboard Scripts and limited modules support. A web-based interface to manage Cloud Code configuration and settings. Create, preview and test-run scripts and preview modules. Unity Gaming Services command-line interface Scripts and modules. A command-line interface to manage Cloud Code configuration and settings. Integrate Cloud Code into CI/CD and iterate with a file-based workflow to deploy Cloud Code alongside other Unity services. Cloud Code Admin API Scripts and modules. A REST API to manage Cloud Code scripts and modules. Create, read, update and delete Cloud Code scripts and modules using the REST API. Cloud Code Client API Scripts and modules. A REST API to call Cloud Code scripts and module endpoints. Call out to Cloud Code scripts and modules through an API call and integrate with products outside of Unity Editor. Deployments Scripts and modules. An extension of Unity Editor and UGS CLI. Use deployments to configure Cloud Code with files instead of the Unity Dashboard. Include these files as part of version control, and minimize context switching with the Unity Dashboard.To understand how to deploy and run your code, follow one of the options in the Take the next step section.
Take the next step#Cloud Code C# modules
Write server-side code with a type-safe programming language and powerful .NET components. Consume other content you need in the project bundling dynamic link libraries (DLLs) with tools like NuGet.
Get started with Cloud Code C# modules.
Cloud Code JavaScript scripts
Write server-side code with a easy to iterate language. Take the advantage of using the same ecosystem if you come from a JavaScript frontend background. Bundle your code with reusable pieces through CommonJS and ECMAScript module systems supported out-of-the-box with the Cloud Code command line.
Get started with Cloud Code JavaScript scripts.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4