For a full working demo - please follow to quickly start a project
Follow these steps to set up
- Create a new project or open an existing one with Unity6 (6000.1+), make sure to switch the project platform to one of the supported ones.
- In Unity, go to Window -> Package management -> Package manager; Then click + and choose “Add package from git url” -> specify the repository’s address as
git@github.com:uglabs/ug-unity-sdk.git
(the repository itself is located athttps://github.com/uglabs/ug-unity-sdk
) and click Install. Alternatively, if using a standalone package file - use the option “install package from tarball” and navigate to io.uglabs.unity.sdk-3.0.0.tgz file.
- Once installed, you’ll need to create a settings file and provide credentials - In Unity Editor, go to Tools -> UG Labs -> Settings -> Create settings -> click Create UGSDK settings, you should see a settings file created under Assets/Resources/UGSDKSettings.asset
- Here, you need to fill in your API Key, and Team name
Fill in the following fields
Host: For Host URL, use: https://pug.stg.uglabs.app
API Key: To get a service account API key, go to https://pug-playground.stg.uglabs.app/service-accounts → click “create service account” → enter it’s name → copy the key
Federated ID: To get a player ID, go to https://pug-playground.stg.uglabs.app/players → click “create player” → enter player’s external id → copy federated id of the player you created (appears at the end of the list)
Team Name: You can leave Team Name empty unless it was created from the API and specific team name was used
Additional setup - Player settings (iOS only)
For iOS builds, make sure to fill in
Microphone usage description
field and enable Prepare iOS for Recording
flag.