### Get Comprehensive Command Help with Examples Source: https://docs.unity.com/en-us/unity-version-control/cli/help Run this command to get detailed help, including examples, for a specific command. ```bash cm --help ``` -------------------------------- ### Example cURL Request to Start Server Source: https://docs.unity.com/en-us/clanforge/api/endpoints/server-start-specific This example demonstrates how to use cURL to send a GET request to the server start endpoint. Ensure you replace YOUR_AUTH_CREDENTIALS with your actual authorization token. ```bash curl --location --request GET 'https://api.multiplay.co.uk/cfp/v1/server//start' \ --header 'Authorization: Basic YOUR_AUTH_CREDENTIALS' ``` -------------------------------- ### Example cURL Request Source: https://docs.unity.com/en-us/clanforge/api/endpoints/server-start-by-criteria Demonstrates how to make a GET request to start a server using specific account service ID, game ID, location ID, and country code. ```bash curl --location --request GET 'https://api.multiplay.co.uk/cfp/v1/server/start?accountserviceid=&gameid=&locationid=1&country_code=' --header 'Authorization: Basic YOUR_AUTH_CREDENTIALS' ``` -------------------------------- ### Run Unity Licensing Server Setup on Linux Source: https://docs.unity.com/en-us/licensing-server/server-setup-cfg-v2 Execute this command in a Linux terminal to start the interactive setup for the Unity Licensing Server. ```bash sudo -H ./Unity.Licensing.Server setup ``` -------------------------------- ### Get Placements API Request URL Source: https://docs.unity.com/en-us/grow/levelplay/platform/api/placements This is an example URL for retrieving placement setup information. Replace '[REPLACE]' with your application's unique key. ```bash https://platform.ironsrc.com/partners/publisher/placements/v1/?appKey=\\[REPLACE] ``` -------------------------------- ### Get Player with Help Option Source: https://docs.unity.com/en-us/services-cli/1.8.0/manual/player/commands/get Example of displaying help and usage information for the 'get player' command. ```bash ugs player get --help ``` -------------------------------- ### Unity Licensing Server Setup - Welcome Message Source: https://docs.unity.com/en-us/licensing-server/server-setup-cfg-v2 This is the initial welcome message displayed when the Unity Licensing Server setup command is run, indicating the start of the configuration process. ```bash Welcome to Unity Licensing Server setup command line interface. This setup will help you configure your license server and generate server registration request file. Enter the server name (e.g. LicenseServer): [DESKTOP] TestServer ``` -------------------------------- ### Example Response for Server Start Source: https://docs.unity.com/en-us/clanforge/api/endpoints/server-start-specific This is an example of a successful response when starting a game server. It indicates the action performed, success status, and server details. ```plaintext { "action": "start", "success": true, "server": { "serverid": } } ``` -------------------------------- ### Example Service Creation Output Source: https://docs.unity.com/en-us/licensing-server/server-setup-svc This is an example of the output you might see after successfully creating the Unity Licensing Server service. It confirms the installation and provides service details. ```text - - - - Welcome to the Unity Licensing Server create service command-line interface. This command-line interface will assist you in creating the Unity.Licensing.Server service. - - - - Choose the Service Account Type for Installation: - [1] Network Service Account - Runs the service with limited privileges on the local system. - [2] User Account - Runs the service as a specified local or domain user. Select an option: [1] Windows service installation successful! Service Name = Unity.Licensing.Server Description = The Unity Licensing Server is a secure web server to host and manage Unity licenses on your local network. ``` -------------------------------- ### Run Unity Licensing Server Setup on Windows Source: https://docs.unity.com/en-us/licensing-server/server-setup-cfg-v2 Execute this command in a Windows PowerShell with administrator privileges to start the interactive setup for the Unity Licensing Server. ```powershell .\Unity.Licensing.Server.exe setup ``` -------------------------------- ### Setup Virtual Environment and Install Requirements (Linux) Source: https://docs.unity.com/en-us/asset-transformer-sdk/2026.4/manual/pixyzui/setup Commands to set up a virtual environment, activate it, and install necessary packages using pip on Linux. ```console python -m venv .venv source ./.venv/Scripts/activate pip install -r .\requirements.txt ``` -------------------------------- ### Setup Virtual Environment and Install Requirements (Windows) Source: https://docs.unity.com/en-us/asset-transformer-sdk/2026.4/manual/pixyzui/setup Commands to set up a virtual environment, activate it, and install necessary packages using pip on Windows. ```console python -m venv .venv .\.venv\Scripts\activate pip install -r .\requirements.txt ``` -------------------------------- ### Get Method Source: https://docs.unity.com/en-us/grow/levelplay/platform/api/placements Provides placement setup information. Requires an appKey for authentication. ```APIDOC ## Get Method ### Description Provides placement setup information. ### Method GET ### Endpoint https://platform.ironsrc.com/partners/publisher/placements/v1/ ### Parameters #### Query Parameters - **appKey** (string) - Mandatory - Application unique identifier ### Response #### Success Response (200) - **adUnit** (string) - ad-unit name: rewardedVideo interstitial banner - **name** (string) - placement unique name - **id** (integer) - Placement unique identifier - **adDelivery** (integer) - 1 if placement ad delivery is on, otherwise 0 - **itemName** (string) - Reward name (max 30 chars) - Mandatory for rewardedVideo only - **rewardAmount** (integer) - Amount of items to gift for a single ad view (max 2000000000) - Mandatory for rewardedVideo only - **capping.enabled** (integer) - 1 to enable capping, otherwise 0 - **capping.limit** (integer) - Maximum number of ads delivered per capping interval (max 1000) - **capping.interval** (string) - capping interval: d - days h - hours - **pacing.enabled** (integer) - 1 to enable pacing, otherwise 0 - **pacing.minutes** (float) - Minimum gap in minutes between ad delivery (max 1000) #### Response Example ```json [ { "name": "Home_Screen", "id": 12, "adUnit": "rewardedVideo", "itemName": "Coins", "rewardAmount": 3, "adDelivery": 1, "capping": { "enabled": 1, "cappingLimit": 3, "cappingInterval": "h" }, "pacing": { "enabled": 1, "pacingMinutes": 12.5 }, "abVersion": "A" } ] ``` ``` -------------------------------- ### Example Licensing Server Output Source: https://docs.unity.com/en-us/licensing-server/quick-start-web This is an example of the output you might see when the licensing server starts successfully. It includes the server version and the URL for status checks. ```text Server Version: 1.6.0.19b28b6 Successfully started the licensing server: http://10.211.55.4:8080/v1/admin/status Press Ctrl+C to shut down... ``` -------------------------------- ### Get Instances v3 Request Example URL Source: https://docs.unity.com/en-us/grow/levelplay/platform/api/instances-api-v4 Example URL for retrieving a list of all application instances using API v3. Requires an appKey. ```text https://platform.ironsrc.com/partners/publisher/instances/v3?appKey=aa2209b1d ``` -------------------------------- ### Example: Create Repository using 'create' Keyword Source: https://docs.unity.com/en-us/unity-version-control/uvcs-cli/repository-create Demonstrates creating a repository named 'Rep01' using the 'create' keyword. ```bash cm repo create Rep01 ``` -------------------------------- ### Run Unity Licensing Server Setup Source: https://docs.unity.com/en-us/licensing-server/quick-start-web Execute the setup command to configure the licensing server. This command initiates an interactive process to set up server name, SSL, network interface, port, and administrator access. ```bash .\Unity.Licensing.Server.exe setup ``` ```bash sudo -H ./Unity.Licensing.Server setup ``` -------------------------------- ### Example: Adding a Repository Source: https://docs.unity.com/en-us/unity-version-control/uvcs-cli/repository-add An example demonstrating how to add a repository named 'myrepository' to the server 'myserver:8084', using 'rep_27' as the database file. ```bash cm repository add rep_27 myrepository myserver:8084 ``` -------------------------------- ### Start Server Query Handler Source: https://docs.unity.com/en-us/multiplay-hosting/sdk/game-server-sdk-for-unity This example demonstrates how to initialize the server query handler using the Multiplay SDK. It sets up default values for server information and starts the handler asynchronously. The handler is updated in the Update loop and can have its response values changed. ```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using Unity.Services.Multiplay; /// /// An example of how to use SQP from the server using the Multiplay SDK. /// The ServerQueryHandler reports the given information to the Multiplay Service. /// public class Example_ServerQueryHandler : MonoBehaviour { private const ushort k_DefaultMaxPlayers = 10; private const string k_DefaultServerName = "MyServerExample"; private const string k_DefaultGameType = "MyGameType"; private const string k_DefaultBuildId = "MyBuildId"; private const string k_DefaultMap = "MyMap"; public ushort currentPlayers; private IServerQueryHandler m_ServerQueryHandler; private async void Start() { m_ServerQueryHandler = await MultiplayService.Instance.StartServerQueryHandlerAsync(k_DefaultMaxPlayers, k_DefaultServerName, k_DefaultGameType, k_DefaultBuildId, k_DefaultMap); } private void Update() { m_ServerQueryHandler.UpdateServerCheck(); } public void ChangeQueryResponseValues(ushort maxPlayers, string serverName, string gameType, string buildId) { m_ServerQueryHandler.MaxPlayers = maxPlayers; m_ServerQueryHandler.ServerName = serverName; m_ServerQueryHandler.GameType = gameType; m_ServerQueryHandler.BuildId = buildId; } public void PlayerCountChanged(ushort newPlayerCount) { m_ServerQueryHandler.CurrentPlayers = newPlayerCount; } } ``` -------------------------------- ### Example: Autocomplete 'show' commands Source: https://docs.unity.com/en-us/unity-version-control/uvcs-cli/autocomplete Demonstrates how to get autocomplete suggestions for commands starting with 'show' at cursor position 7 on the line 'cm show'. This will typically list commands like showcommands, showfindobjects, etc. ```bash cm autocomplete --line "cm show" --position 7 ``` -------------------------------- ### Example: Create a Single Repository Source: https://docs.unity.com/en-us/unity-version-control/uvcs-cli/repository-create A practical example demonstrating how to create a repository named 'MyRep'. ```bash cm repository MyRep ``` -------------------------------- ### Start UVCS Server (Linux Example) Source: https://docs.unity.com/en-us/unity-version-control/uvcs-on-prem/start-stop-restart-server Example command to start the UVCS server using the init.d script on Linux. ```text /etc/init.d/plasticsd start ``` -------------------------------- ### Example of Displaying GameUI Help Source: https://docs.unity.com/en-us/unity-version-control/release-notes/5 Demonstrates how to execute the gameui.exe with the --help argument to view available commands. ```text $> gameui.exe --help ``` -------------------------------- ### Run Licensing Server Setup Command Source: https://docs.unity.com/en-us/licensing-server/migrating Execute the setup command to migrate the licensing server. Ensure you are in the Licensing Server program files directory and use elevated privileges. ```bash sudo -H ./Unity.Licensing.Server setup ``` ```powershell .\Unity.Licensing.Server.exe setup ``` -------------------------------- ### Example Open with Configuration Source: https://docs.unity.com/en-us/unity-version-control/config-files/openwith-conf An example of an `openwith.conf` entry that adds Notepad++ to the 'Open with' menu, accessible via Ctrl+I. This allows opening files with Notepad++ directly from the version control application. ```conf [Notepad|CtrlI] "C:\Program Files (x86)\Notepad++\notepad++.exe" @file ``` -------------------------------- ### Image install status Source: https://docs.unity.com/en-us/clanforge/api/resources/game-image Gets the installation status of a game image. ```APIDOC ## GET /api/v1/game-image/install/status ### Description Gets the installation status of a game image. ### Method GET ### Endpoint /api/v1/game-image/install/status ``` -------------------------------- ### Install, Start, Stop, and Uninstall Plastic Proxy Service Source: https://docs.unity.com/en-us/unity-version-control/release-notes/8 Demonstrates the command-line usage for managing the Plastic proxy service, including installation, starting, stopping, and uninstallation. ```console C:\PlasticSCM\server> plasticd proxy --installservice Installing service Plastic Proxy... Service Plastic Proxy has been successfully installed. Creating EventLog source Plastic Proxy in log Application... Service correctly installed C:\PlasticSCM\server> plasticd proxy --start Server started C:\PlasticSCM\server> plasticd proxy --stop Server stopped C:\PlasticSCM\server> plasticd proxy --uninstallservice Removing EventLog source Plastic Proxy. Service Plastic Proxy is being removed from the system... Service Plastic Proxy was successfully removed from the system. Service correctly uninstalled ``` -------------------------------- ### Fetch Command with Project ID and Environment Source: https://docs.unity.com/en-us/services-cli/1.5.0/manual/general/base-commands/fetch Example of fetching configurations specifying the project ID and environment name. ```text ugs fetch --project-id= --environment-name= ``` -------------------------------- ### Example: List Repositories using 'mk' Source: https://docs.unity.com/en-us/unity-version-control/uvcs-cli/repository-create This command uses the 'mk' keyword, typically for creation, but in this context with 'list', it might be used to list available repositories or perform a related action. ```bash cm repo mk list ``` -------------------------------- ### Start Plastic Proxy Service Source: https://docs.unity.com/en-us/unity-version-control/release-notes/11 Use the `plasticd proxy --start` command to start the Plastic Proxy service after it has been installed. ```bash plasticd proxy --start ``` -------------------------------- ### Example Launch Parameters Source: https://docs.unity.com/en-us/multiplay-hosting/concepts/launch-parameters This snippet shows how to format launch parameters with variables like port, query port, and log directory. ```plaintext -port $$port$$ -queryport $$query_port$$ -log $$log_dir$$ ``` -------------------------------- ### Example: Delete Single Code Review by GUID Source: https://docs.unity.com/en-us/unity-version-control/uvcs-cli/codereview Illustrates deleting a single code review using its GUID. ```bash cm codereview 27658884-5dcc-49b7-b0ef-a5760ae740a3 -d ``` -------------------------------- ### Fetch Command with Path Source: https://docs.unity.com/en-us/services-cli/1.5.0/manual/general/base-commands/fetch Example of fetching configurations into the current directory. ```text ugs fetch . ``` -------------------------------- ### Install Plastic Proxy Service Source: https://docs.unity.com/en-us/unity-version-control/release-notes/11 Use the `plasticd proxy --installservice` command to install the Plastic Proxy service on Windows. This command installs the service but does not start it. ```bash plasticd proxy --installservice ``` -------------------------------- ### Get Workspace Info for Specific Path Source: https://docs.unity.com/en-us/unity-version-control/uvcs-cli/getworkspaceinfo This example shows how to get the workspace information for a specific workspace path on your machine. ```bash cm wi c:\mywk ``` -------------------------------- ### Example GET Request for Image Diff Status Source: https://docs.unity.com/en-us/clanforge/api/endpoints/image-diff-status Example of how to use cURL to get the status of an image difference analysis. Ensure you include your authorization credentials and the required account service ID. The `diff_info=1` parameter retrieves additional details about the diff. ```plaintext curl -X GET \ -H "Authorization: Basic " \ https://api.multiplay.co.uk/cfp/v1/imagediff/1234/status?accountserviceid=5678&diff_info=1 ``` -------------------------------- ### External Tools Configuration File Example Source: https://docs.unity.com/en-us/unity-version-control/config-files/externaltools-conf Provides a practical example of how to configure external tools for different object types. Shows how to specify paths, environment variables, and arguments with placeholders. ```conf item | Open with sublime | C:\Program Files\Sublime Text 3\subl.exe | "@object" ``` ```conf label:changeset:branch | Create new code review... | /usr/bin/createcodereview | "@object@@repository" @wkpath ``` ```conf item | Preview with PhotoScape | %PHOTOSCAPE_PATH% | "@object" ``` -------------------------------- ### File Structure Example Source: https://docs.unity.com/en-us/services-cli/1.4.0/manual/general/deployment-definition/commands-for-deployment-definition Illustrates a typical project file structure including deployable assets and their associated definition files. ```text Assets/ ├── DeployableAssets/ │ ├── CloudCode/ │ │ ├── CloudCode.ddef │ │ ├── scriptA.js │ │ ├── scriptB.js │ │ └── Tests/ │ │ ├── scriptA_test.js │ │ └── scriptB_test.js │ └── Remote Config/ │ ├── RemoteConfig.ddef │ ├── configA.rc │ └── configB.rc ``` -------------------------------- ### Example Image Install Status Response Source: https://docs.unity.com/en-us/clanforge/api/endpoints/image-install-status This JSON structure represents the response when querying for image install job statuses. It contains an 'installs' array detailing each job's progress and state. ```json { "installs": [ { "jobid": , "jobcreated": , "joberror": , "jobeta": , "jobfailed": , "jobprogress": , "jobstart": , "jobstateid": , "jobstatename": , "jobupdated": , "mirroring": , "restart": , "location": , "machine": , "imagepath": , "install_at": , "mirror": , "target_imageversionid": , "restart": } ] } ``` -------------------------------- ### External Tools Configuration Examples Source: https://docs.unity.com/en-us/unity-version-control/release-notes/6 Provides examples of how to configure external tools for different object types and actions. Demonstrates placeholder usage for object names, repositories, and workspace paths. ```text item | Open with sublime | C:\\Program Files\\Sublime Text 3\\subl.exe | "@object" ``` ```text label:changeset:branch | Create new code review... | /usr/bin/createcodereview | "@object@@repository" @wkpath ``` -------------------------------- ### Stop UVCS Server (Linux Example) Source: https://docs.unity.com/en-us/unity-version-control/uvcs-on-prem/start-stop-restart-server Example command to stop the UVCS server using the server installation directory script on Linux. ```text /opt/plasticscm5/server/plasticsd stop ``` -------------------------------- ### Retrieve Build Installs Command Source: https://docs.unity.com/en-us/services-cli/1.4.0/manual/game-server-hosting/commands/builds/build-installs Use this command to get a list of installs for a specific Game Server Hosting build. Authentication is required. ```bash ugs game-server-hosting build installs [options] ``` -------------------------------- ### Request Example URL Source: https://docs.unity.com/en-us/grow/ad-quality/ad-quality-raw-data Example of a GET request to the Ad Quality raw data API to fetch data for a specific app and date. ```bash request GET 'https://ad-quality.soomla.com/api/rawdata/v1?appKey=c0492d05&date=2022-07-12' ``` -------------------------------- ### Deploy and Fetch Configurations (With Source Control) Source: https://docs.unity.com/en-us/services/service-environments Leverage source control with `ugs deploy` for easier tracking and automation of deployments. This example demonstrates deploying from a specific branch and rolling back using tags. ```bash git checkout origin/stable ugs deploy ugs_config_folder #rollback git checkout tags/last-release -b stable ugs deploy ugs_config_folder ``` -------------------------------- ### Help for binmergetool utility Source: https://docs.unity.com/en-us/unity-version-control/release-notes/7 This example shows how to view the help documentation for the 'binmergetool' utility when run without arguments. ```bash binmergetool ``` -------------------------------- ### Unity Licensing Server Setup - Successful Completion Output Source: https://docs.unity.com/en-us/licensing-server/server-setup-cfg-v2 Sample output displayed upon successful completion of the Unity Licensing Server setup, including generated files and important notes. ```bash Generating signing key... Done Generating server configuration ...Done Generating services configuration ...Done Reloading configuration... Done Generating server registration request file... Done Setting up file permissions... Done - - - - Setup Completed! - - - - Server Registration Request Please go to Unity ID portal -> Organizations -> [Organization Name] -> Subscriptions & Services -> [Floating Subscription] -> Configure License Server, upload server-registration-request.xml, and follow the instructions to receive a compressed license archive file. File to upload: /home/adminuser/server-registration-request.xml Services Configuration File Generated services-config.json file must be copied to the following location on all end user computer in order to enable floating licensing: - Windows: %PROGRAMDATA%\Unity\config\ - MacOS: /Library/Application Support/Unity/config/ - Linux: /usr/share/unity3d/config/ File to copy: /home/adminuser/services-config.json WARNING: Please make sure to backup the following directory as it contains essential data for operating the licensing server: ... [Path varies by server version and operating system] ``` -------------------------------- ### ByteBrew: Share Install Data from All Sources Source: https://docs.unity.com/en-us/user-acquisition/partner-integration/integration-troubleshooting In the ByteBrew dashboard, configure the integration setup to send all install events from all partners and organic sources. ```text 1. In the **Install Settings** tab of the **ByteBrew** integration setup, go to the **Send all install events from** section. 2. Select **All Partners and Organics**. ``` -------------------------------- ### Example LDAP Filter for UID Attribute Absence Source: https://docs.unity.com/en-us/unity-version-control/uvcs-on-prem/webadmin/authentication-config An example of a user-specified LDAP filter to be used when the UID attribute is not present in the LDAP setup. ```text |(sAMAccountName={user})(cn={user})) ``` -------------------------------- ### Install Unity Version Control Complete Installation on Debian Source: https://docs.unity.com/en-us/unity-version-control/install-uvcs-on-linux Installs the complete package for Unity Version Control on Debian systems. This includes both server and client tools, suitable for on-premises server setups. ```bash sudo apt-get install plasticscm-complete ``` -------------------------------- ### Log JIRA Changeset GUID Source: https://docs.unity.com/en-us/unity-version-control/release-notes/5 Example of how the Changeset GUID is logged in the JIRA extension's checkin log. This shows the format and details included. ```text Date: 9/10/2015 12:25:25 PM Changeset 4424@default@localhost:8084 by dhernandez Changeset guid: 5372daf7-f740-4d05-b9d2-a30823907bb2 Branch: /main/scm029 Comments: Rename csproj files Items: Changeset 4424@default M /client2008.csproj -> /client2010.csproj M /server2008.csproj.-> /server2010.csproj ``` -------------------------------- ### Example Configuration for External Data Storage and MinSize Source: https://docs.unity.com/en-us/unity-version-control/release-notes/5 An example demonstrating the combined configuration for external data storage, including the base path for the storage directory and the minimum size threshold for revision chunks. ```xml C:\PlasticSCM\server\db_storage 1000 ``` -------------------------------- ### Example Launch Parameter for Dynamic Port Source: https://docs.unity.com/en-us/multiplay-hosting/concepts/integration-requirements This example shows how to pass the dynamic port number variable to your build executable at startup using a launch parameter. Ensure your build supports using the `$$port$$` variable. ```plaintext -port $$port$$ ``` -------------------------------- ### Get Line Curve Definition Source: https://docs.unity.com/en-us/asset-transformer-sdk/2026.4/api/python/cad_functions Retrieves the origin and direction of a line curve. Use this function to get the start point and vector of a line segment. ```python cad.getLineCurveDefinition(lineCurve) -> geom.Point3, geom.Point3 ``` -------------------------------- ### Get or Set Editor Install Path Source: https://docs.unity.com/en-us/hub/unity-cli Displays or modifies the directory where the CLI installs Unity Editors. Use `--help` for specific options. ```shell unity install-path [options] ``` -------------------------------- ### Example Service Query Output Source: https://docs.unity.com/en-us/licensing-server/server-setup-svc This is an example of the output from the 'sc.exe query' command, showing the state of the Unity Licensing Server service. A state of '4 RUNNING' indicates the service is active. ```text SERVICE_NAME: Unity.Licensing.Server TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 ``` -------------------------------- ### Example Directory Hierarchy and Deployment Definitions Source: https://docs.unity.com/en-us/services-cli/1.6.0/manual/general/deployment-definition/what-is-deployment-definition Illustrates a file hierarchy and shows which Deployment Definition files are responsible for which assets. ```text Assets/ ├── DeployableAssets/ │ ├── CloudCode/ │ │ ├── CloudCode.ddef │ │ ├── scriptA.js │ │ ├── scriptB.js │ │ └── Tests/ │ │ ├── CloudCodeTests.ddef │ │ ├── scriptA_test.js │ │ └── scriptB_test.js │ └── Remote Config/ │ ├── RemoteConfig.ddef │ ├── configA.rc │ └── configB.rc ``` -------------------------------- ### Example Group Permissions Source: https://docs.unity.com/en-us/unity-version-control/security-scenarios Examples demonstrating how to set permissions for 'Core_group', 'Art_group', and 'Doc_group' to their respective repositories. ```bash cm acl -group=Core_group -allowed=+all rep:Core@example.uvcs.server@cloud ``` ```bash cm acl -group=Art_group -allowed=+all rep:Art@example.uvcs.server@cloud ``` ```bash cm acl -group=Doc_group -allowed=+all rep:Doc@example.uvcs.server@cloud ``` -------------------------------- ### Handle Server Allocation and Readiness Source: https://docs.unity.com/en-us/multiplay-hosting-unreal/cpp-integration Implement the OnAllocate callback to perform setup logic and then signal to Multiplay that the server is ready for players. Includes delegates for success and failure. ```cpp void UMyClass::OnAllocate() { // Perform setup logic. FReadyServerSuccessDelegate OnSuccess; FReadyServerFailureDelegate OnFailure; OnSuccess.BindDynamic(this, &UMyClass::OnReadyServerSuccess); OnFailure.BindDynamic(this, &UMyClass::OnReadyServerFailure); GameServerSubsystem->ReadyServerForPlayers(OnSuccess, OnFailure); } ``` -------------------------------- ### Example Reserve Server Request Source: https://docs.unity.com/en-us/clanforge/api/endpoints/reserve Demonstrates how to make a GET request to reserve a game server. Ensure you replace placeholders like ``, ``, and `YOUR_AUTH_CREDENTIALS` with your actual values. ```bash curl --location --request GET 'https://api.multiplay.co.uk/cfp/v1/machine//reserve_server?serverid=' --header 'Authorization: Basic YOUR_AUTH_CREDENTIALS' --header 'Content-Type: application/x-www-form-urlencoded' ``` -------------------------------- ### Example Reporting Request Source: https://docs.unity.com/en-us/grow/levelplay/sdk/ios/custom-adapters-reporting-api This is an example of a GET request ironSource will send to your reporting endpoint for a specific account and date. Ensure your endpoint is configured to handle these parameters. ```http GET https://www.CustomNetworkEndPoint.com?date=2021-09-01\&apiKey=value1\&myUser=value2 ``` -------------------------------- ### Handle Multiplay Hosting Events in Unity Source: https://docs.unity.com/en-us/multiplay-hosting/sdk/game-server-sdk-for-unity This example demonstrates how to set up and subscribe to Multiplay Hosting events like allocation, deallocation, and errors. It includes handlers for each event type and the subscription state changes. Ensure this setup occurs early in the server's lifecycle. ```csharp using System; using System.Collections; using System.Collections.Generic; using Unity.Services.Multiplay; using UnityEngine; /// /// An example of how to access and react to multiplay server events. /// public class Example_ServerEvents : MonoBehaviour { private MultiplayEventCallbacks m_MultiplayEventCallbacks; private IServerEvents m_ServerEvents; /// /// This should be done early in the server's lifecycle, as you'll want to receive events as soon as possible. /// private async void Start() { // We must first prepare our callbacks like so: m_MultiplayEventCallbacks = new MultiplayEventCallbacks(); m_MultiplayEventCallbacks.Allocate += OnAllocate; m_MultiplayEventCallbacks.Deallocate += OnDeallocate; m_MultiplayEventCallbacks.Error += OnError; m_MultiplayEventCallbacks.SubscriptionStateChanged += OnSubscriptionStateChanged; // We must then subscribe. m_ServerEvents = await MultiplayService.Instance.SubscribeToServerEventsAsync(m_MultiplayEventCallbacks); } /// /// Handler for receiving the allocation multiplay server event. /// /// The allocation received from the event. private void OnAllocate(MultiplayAllocation allocation) { // Here is where you handle the allocation. // This is highly dependent on your game, however this would typically be some sort of setup process. // Whereby, you spawn NPCs, setup the map, log to a file, or otherwise prepare for players. // After you the allocation has been handled, you can then call ReadyServerForPlayersAsync()! } /// /// Handler for receiving the deallocation multiplay server event. /// /// The deallocation received from the event. private void OnDeallocate(MultiplayDeallocation deallocation) { // Here is where you handle the deallocation. // This is highly dependent on your game, however this would typically be some sort of teardown process. // You might want to deactivate unnecessary NPCs, log to a file, or perform any other cleanup actions. } /// /// Handler for receiving the error multiplay server event. /// /// The error received from the event. private void OnError(MultiplayError error) { // Here is where you handle the error. // This is highly dependent on your game. You can inspect the error by accessing the error.Reason and error.Detail fields. // You can change on the error.Reason field, log the error, or otherwise handle it as you need to. } /// /// /// /// private void OnSubscriptionStateChanged(MultiplayServerSubscriptionState state) { switch (state) { case MultiplayServerSubscriptionState.Unsubscribed: /* The Server Events subscription has been unsubscribed from. */ break; case MultiplayServerSubscriptionState.Synced: /* The Server Events subscription is up to date and active. */ break; case MultiplayServerSubscriptionState.Unsynced: /* The Server Events subscription has fallen out of sync, the subscription tries to automatically recover. */ break; case MultiplayServerSubscriptionState.Error: /* The Server Events subscription has fallen into an errored state and won't recover automatically. */ break; case MultiplayServerSubscriptionState.Subscribing: /* The Server Events subscription is trying to sync. */ break; } } } ``` -------------------------------- ### Example Schedule Configuration (Combined) Source: https://docs.unity.com/en-us/triggers/tutorials/schedule-events/cli A sample JSON file demonstrating both recurring and one-time schedule configurations. ```json { "$schema": "https://ugs-config-schemas.unity3d.com/v1/schedules.schema.json", "Configs": { "Schedule1": { "EventName": "EventType1", "Type": "recurring", "Schedule": "0 * * * *", "PayloadVersion": 1, "Payload": "{}" }, "Schedule2": { "EventName": "EventType2", "Type": "one-time", "Schedule": "2024-03-08T13:06:32.311+00:00", "PayloadVersion": 1, "Payload": "{ \"message\": \"Hello, world!\"}" } } } ``` -------------------------------- ### Full Interstitial Ad Implementation Example Source: https://docs.unity.com/en-us/grow/levelplay/sdk/flutter/interstitial-integration This example demonstrates the complete setup for interstitial ads, including initialization, loading, and handling ad lifecycle events. ```dart final LevelPlayInterstitialAd _interstitialAd = LevelPlayInterstitialAd(adUnitId: 'YOUR_AD_UNIT_ID'); @override void initState() { super.initState(); _interstitialAd.setListener(this); _interstitialAd.loadAd(); } @override void onAdClicked(LevelPlayAdInfo adInfo) { // Implement your logic here... } @override void onAdClosed(LevelPlayAdInfo adInfo) { // Implement your logic here... } @override void onAdDisplayFailed(LevelPlayAdError error, LevelPlayAdInfo adInfo) { // Implement your logic here... } @override void onAdDisplayed(LevelPlayAdInfo adInfo) { // Implement your logic here... } @override void onAdInfoChanged(LevelPlayAdInfo adInfo) { // Implement your logic here... } @override void onAdLoadFailed(LevelPlayAdError error) { // Implement your logic here... } @override void onAdLoaded(LevelPlayAdInfo adInfo) { // Implement your logic here, for example showing the ad _interstitialAd.showAd(); } // Rest of the widget // End of widget... ``` -------------------------------- ### Initiate Channel Join and Handle Events Source: https://docs.unity.com/en-us/vivox-unity/developer-guide/channels/initiate-channel-join This example shows how to initiate a channel join and subscribe to channel joined/left events. Ensure you have a signed-in ILoginSession before calling these methods. Events should be bound within the lifecycle of an active LoginSession. ```csharp using System; using System.ComponentModel; using UnityEngine; using Unity.Services.Vivox; class JoinChannelExample : MonoBehaviour { // For this example, _loginSession is a signed in ILoginSession. . . . void OnLoggedIn() { //These events can be bound anywhere, but keeping them within the lifecycle of an active LoginSession is typically best VivoxService.Instance.ChannelJoined += OnChannelJoined; VivoxService.Instance.ChannelLeft += OnChannelLeft; } void OnChannelJoined(string channelName) { //Perform actions to react to joining the specific channel with name channelName //UI switches, participant UI setup, etc } void OnChannelLeft(string channelName) { //Perform cleanup to react to leaving a specific channel with name channelName } async void JoinChannelAsync(string channelName) { //Join channel with name channelName and capability for text and audio transmission VivoxService.Instance.JoinGroupChannelAsync(channelName, ChatCapability.TextAndAudio); } . . . } ``` -------------------------------- ### Get Current License Information Source: https://docs.unity.com/en-us/asset-transformer-sdk/2026.4/api/csharp/core_coreinterface Retrieves information about the currently installed license. ```csharp [HandleProcessCorruptedStateExceptions] public LicenseInfos GetCurrentLicenseInfos() ``` -------------------------------- ### Full Server.json Configuration Example Source: https://docs.unity.com/en-us/clanforge/legacy/server-json-file A comprehensive example of the server.json file, including allocation UUID, session authentication, connection IP, and port. ```plaintext { "AllocationUUID": "$$allocated_uuid$$", "SessionAuth": "$$session_auth$$", "ConnectionIP": "$$ip$$", "ConnectionPort": "$$port$$" } ``` -------------------------------- ### Initial File Structure Example Source: https://docs.unity.com/en-us/unity-version-control/release-notes/5 Represents the initial state of files and directories in a project. ```text / /dialogs /dialogs/Progress.cs /views ``` -------------------------------- ### Start Game Server API Endpoint Source: https://docs.unity.com/en-us/clanforge/api/endpoints/server-start-specific Use this GET endpoint to start a game server identified by its server ID. If the server is already running, this request will have no effect. ```plaintext https://api.multiplay.co.uk/cfp/v1/server//start ``` -------------------------------- ### Create New Project and Install Package Source: https://docs.unity.com/en-us/hub/deeplinking-support This URL format allows for the creation of a new local project and automatically opens the Package Manager for installing a specified package once the new project is loaded. ```html https://link.unity.com/hub/project/new/package-manager/install/{package-and-version} ``` -------------------------------- ### Image Install Queue Response (Mirror Jobs) Source: https://docs.unity.com/en-us/clanforge/api/endpoints/image-install-queue This is an example of a successful response when queuing a mirrored image install job. It provides details about the job's status and metadata. ```json { "versionmirrorid": , "jobcreated": , "joberror": , "jobeta": , "jobfailed": , "jobprogress": , "jobstart": , "jobstateid": , "jobstatename": , "jobupdated": } ``` -------------------------------- ### Create a Session as Host (Client-Hosted) Source: https://docs.unity.com/en-us/mps-sdk/create-session Example of creating a session with a client-hosted solution. Configures the session with a maximum of 2 players and uses Relay networking. Logs the session ID and join code to the Unity Editor console. ```cs async Task StartSessionAsHost() { var options = new SessionOptions { MaxPlayers = 2 }.WithRelayNetwork(); // or WithDistributedAuthorityNetwork() to use Distributed Authority instead of Relay var session = await MultiplayerService.Instance.CreateSessionAsync(options); Debug.Log($"Session {session.Id} created! Join code: {session.Code}"); } ``` -------------------------------- ### Get a Transformation Source: https://docs.unity.com/en-us/cloud/asset-manager/python-sdk/manage-transformations Retrieves a previously started transformation by providing dataset and transformation identifiers. ```APIDOC ## Get a Transformation ### Description Retrieves the status and details of a previously started transformation using its unique identifier and associated dataset information. ### Method `unity_cloud.assets.get_transformation` ### Parameters #### Path Parameters - **org_id** (string) - Required - The organization ID. - **project_id** (string) - Required - The project ID. - **asset_id** (string) - Required - The ID of the asset. - **asset_version** (string) - Required - The version of the asset. - **dataset_id** (string) - Required - The ID of the dataset. #### Query Parameters - **workflow_id** (string) - Required - The ID of the transformation to retrieve. ### Request Example ```python transformation = unity_cloud.assets.get_transformation( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = "1234abcd-ab12-cd34-ef56-123456abcdef", dataset_id = "1234abcd-12ab-34cd-56ef-123456abcdef", workflow_id = "012345678912" ) ``` ### Response #### Success Response (200) - **transformation** (object) - The transformation object with its current status and details. ``` -------------------------------- ### Response Example for GET Instances Source: https://docs.unity.com/en-us/grow/levelplay/platform/api/instances-api-v4 Example JSON response structure for retrieving application instances, detailing properties like instance ID, name, ad unit, network, and status. ```JSON [ { "instanceId": 1072562, "instanceName": "", "adUnit": "rewardedVideo", "adFormat": "rewarded", "networkName": "unityAds", "appConfig1": "qtr", "instanceConfig1": "trb", "isBidder": true, "groups": [101663], "isLive": true }, { "instanceId": 1014428, "instanceName": "Default", "adUnit": "interstitial", "adFormat": "interstitial", "networkName": "unityAds", "appConfig1": "qertb", "instanceConfig1": "qtrb", "isBidder": false, "groups": [101664], "isLive": true, "rate": 25 }, { "instanceId": 1845809, "instanceName": "Default", "adUnit": "rewardedVideo", "adFormat": "rewarded", "networkName": "adManager", "appConfig1": "bqw", "instanceConfig1": "qqr", "isBidder": false, "groups": [101663 ], "isLive": true, "rate": 4 } ] ``` -------------------------------- ### Unity Licensing Server Setup Migration Output Source: https://docs.unity.com/en-us/licensing-server/migrating Sample output from the Unity Licensing Server setup command during a migration that requires user confirmation on Windows. This shows the process of upgrading from version 1.10.0 to 1.11.0. ```bash > .\Unity.Licensing.Server.exe setup - - - - Welcome to Unity Licensing Server setup command line interface. This setup will help you configure your license server and generate server registration request file. - - - - Upgrading from 1.10.0 to 1.11.0... This migration can take more than a few minutes. Are you sure you want to run it now? [y/N] y Proceeding with migration...Backup installed version 1.10.0...Done Scripts to run: 1.11.0 Executing 1.11.0...Done Stamping version 1.11.0...Done Successfully migrated from 1.10.0 to 1.11.0 Enter the server name (e.g. LicenseServer): ``` -------------------------------- ### Create Instance Request Example Source: https://docs.unity.com/en-us/grow/levelplay/platform/api/instances-api-v4 This example shows the structure of a request body for creating a new instance with various configuration parameters. ```text [ { "instanceId": 122, "instanceName": "newInstance", "appConfig1": "414n", "instanceConfig1": "aaa1", "instanceConfig2": "aaa1", "groups": [1], "isLive": true, "rate": 2 } ] ``` -------------------------------- ### Impression-Level Revenue API Request Example Source: https://docs.unity.com/en-us/grow/is-ads/monetization/apis/impression-level-revenue-server-side Example of a GET request URL for the Impression-Level Revenue API v3. Ensure you replace placeholder values with your actual appKey, date, and reportType. ```text https://platform.ironsrc.com/partners/userAdRevenue/v3?appKey=12345678&date=2018-12-15&reportType=1 ``` -------------------------------- ### View Licensing Server Help (Linux) Source: https://docs.unity.com/en-us/licensing-server/server-setup Display the help information for the Unity Licensing Server CLI on Linux. ```bash ./Unity.Licensing.Server --help ``` -------------------------------- ### Get Player with Quiet Option Source: https://docs.unity.com/en-us/services-cli/1.8.0/manual/player/commands/get Example of retrieving player information with reduced logging output. ```bash ugs player get --quiet ```