Get started
This section explains how to start using Unity Cloud Python SDK.
Read time 1 minuteLast updated 8 days ago
Before you begin, verify you meet the prerequisites.
Install the Python SDK package
To install Python SDK, follow these steps:- Run the following command:
pip install --index-url https://unity3ddist.jfrog.io/artifactory/api/pypi/am-pypi-prod-local/simple unity-cloud
- If it's not the first time you're installing the Python SDK, add the argument in the command as follows:
--force-reinstall
.pip install --index-url https://unity3ddist.jfrog.io/artifactory/api/pypi/am-pypi-prod-local/simple unity-cloud --force-reinstall
Use the Python SDK
To use the SDK, first callinitialize()
def initialize(): unity_cloud.initialize() unity_cloud.identity.user_login.use() # Check whether the user is signed in auth_state = unity_cloud.identity.user_login.get_authentication_state() if auth_state != unity_cloud.identity.user_login.Authentication_State.LOGGED_IN: unity_cloud.identity.user_login.login()
However, if you need to run an initialization again, you must uninitialize before that. Here is an example of the typical uninitialize process:
Read more about the Identity module and managing authentication.def uninitialize(): unity_cloud.uninitialize()