Get started with Collaboration SDK
Unity Cloud Collaboration is a service that enables real-time collaboration features in your Unity projects. Use the Collaboration SDK to perform the following:
- Create, read, update, and delete annotations
- Organize annotations in conversation threads
- Reply to annotations
- Resolve and unresolve annotations
- Subscribe and unsubscribe users from threads
- Create, update, and delete attachments for annotations
- Add and remove reactions to annotations
- Integrate with Jira: manage Jira server/project configs, link/unlink projects, search/create/link/unlink issues, search users, check permissions, and more
This section explains how to set up a basic scene and script to initialize and use the Unity Cloud Collaboration package. The sample script demonstrates how to create annotations, reply to them, manage thread subscriptions, and access Jira Management features. Before you begin, verify you meet the prerequisites.
Requirements
To use the Collaboration SDK, you must have a minimum role of Collaboration User in your Unity Cloud project.
Integrate the package in a Unity project
To integrate the Unity Cloud Collaboration package in a Unity project, do the following:
- Setup a login infrastructure
- Use the methods offered by the PlatformServices instance
- Create AnnotationManagement and JiraManagement
- Create the PlatformServices
- Create the behavior for managing Annotations and Jira
- Create an interface for all UI scripts
Setup a login infrastructure
The user of the collaboration SDK needs to log in with their Unity account. To do so, please follow the instruction in the Identity package documentation, or take example from the samples provided with the package.
Use PlatformServices
- Create an instance of IAuthenticationPlatformSupport (from Identity SDK).
var platformSupport = PlatformSupportFactory.GetAuthenticationPlatformSupport();
- Create an instance of IServiceHostResolver (from Common SDK).
var serviceHostResolver = UnityRuntimeServiceHostResolverFactory.Create();
- Create an instance of UnityCloudPlayerSettings (from Common SDK).
var playerSettings = UnityCloudPlayerSettings.Instance;
- Create an instance of DotNetHttpClient (from Common SDK).
var httpClient = new DotNetHttpClient();
- Create an instance of CompositeAuthenticatorSettings (from Identity SDK).
var compositeAuthenticatorSettings = new CompositeAuthenticatorSettingsBuilder(httpClient, platformSupport, serviceHostResolver, playerSettings)
.AddDefaultPkceAuthenticator(playerSettings)
.Build();
- Create an instance of CompositeAuthenticator (from Identity SDK).
var compositeAuthenticator = new CompositeAuthenticator(compositeAuthenticatorSettings);
- Create an instance of ServiceHttpClient (from Common SDK).
var serviceHttpClient = new ServiceHttpClient(httpClient, compositeAuthenticator, playerSettings);
- Create an instance of UnityRuntimeServiceHostResolverFactory (from Common SDK).
var serviceHostResolver = UnityRuntimeServiceHostResolverFactory.Create();
- Create an instance of AnnotationManagementFactory and JiraManagementFactory (from Collaboration SDK).
private static AnnotationManagementFactory m_aManagementFactory = new AnnotationManagementFactory();
private static JiraManagementFactory m_jManagementFactory = new JiraManagementFactory();
- Create an instance of AnnotationManagement and JiraManagement
var annotationManagement = m_aManagementFactory.GetAnnotationManagement(serviceHttpClient, annotationHostResolver);
var jiraManagement = m_jManagementFactory.GetJiraManagement(serviceHttpClient, annotationHostResolver);
The AnnotationManagement interface is the entry point for accessing the Unity Cloud Collaboration SDK functionality for managing annotations.
The JiraManagement interface is the entry point for accessing the Unity Cloud Collaboration SDK functionality for managing Jira-related features, such as configs, issues, users, and linking.
For more information on specific collaboration features, see the "Use cases" section in the documentation, including both Annotation Management and Jira Management use cases.
Note
The Collaboration SDK is designed to be flexible and adaptable to different project requirements. Start with the basic features demonstrated here and gradually build a collaboration system tailored to your specific needs.