Quickstart Guide
UGC Editor Bridge
The User-Generated Content (UGC) Editor Bridge is a Unity package allowing content creators to upload UGC for a specific game directly from the Unity editor. It is a template Unity package provided to game studios developing UGC games, so they can modify it to suit their needs and designs, while being functional by default without changing anything.
The UGC Bridge aims to reduce the friction of the UGC integration in a game, leveraging the Unity editor itself as the base of the UGC editor, therefore also reducing the engineering cost of such integration.
Before we start, it's useful to understand there are two different types of projects we are going to talk about; the UGC game project and the UGC Editor Bridge project.
The UGC game project is the Unity project of the game. This project is owned by the game studio and most likely will not be shared with content creators.
The UGC Editor Bridge project is a project created to host the UGC Editor Bridge package customized by the game studio. This project can be packed with the customized package or created on the fly by content creators. It is up to the game developer to package this project as they see fit based on their preference, as you will see in the deployment section.
Requirements
UGC Project
In order to use the UGC Editor Bridge, one should first have a UGC enabled project. The project use for the UGC Editor Bridge does not need to be the same than the game project, but we will share the project id between those two, so the UGC Editor Bridge project can publish content for the game project. The Unity requirements are the same as the UGC SDK.
Installation
Getting the template package
Go to [...] to download the template package for the UGC Editor Bridge.
Adding the package to a project
In a new Unity project, open the package manager. Click on the "+" button in the top left corner and select "Add package from disk". Navigate to your downloaded package, select the package.json file and click open.
Setup the UGC Editor Bridge
In the project settings, select "UGC Bridge". In the project id field, copy-paste the id from your UGC game project. For the environment, you can either leave it like this or create a new environment and paste its name in the field.
The steps fields would be filled with the Simple steps but you can create your own steps. See the customization section for related information.
Usage
Main Panel
Open the main panel by clicking on the menu item "Services -> Ugc -> Main Panel".
Authentication
To publish content, the content creator needs to bee authenticated. A user can authenticate through the Main Panel as an anonynous user or through one of the configured providers (see the related section).
Selecting and Publishing Content
In a the default usecase, we would first select any asset in the project window as the content we want to publish. Once selected, it should be reflected in the "Selection" section of the main panel. After that, we can either create a new content with it (and fill all the related fields like name, description, tags, etc.) or select a preexisting content and just publish our selection as a new version for that content.
Validation
In case we have configured validation rules for the content we want to publish, then it would be validated at the publishing step. If there are some validation issue then we can see at the bottom of the publishing panel and fix them. For more information about Validation rules see the related section.
Customization
The UGC Editor Bridge is designed to be customized by the project developers using it for their game. The UI and processes are built around 5 customizables steps; Authentication, Selection, Publishing, Validation and Building. We provide an easy way to create new steps for your project. Once created, you will be able to customize each step as you which and add whatever features or fields you may want. We provide functional examples for each type of step to help you understand the process.
Create new validation rules
To create a new validation rule, right click in the project view and select "Create/UGC Bridge/Validation Rule Templates/New Validation Rule Script". This will create a new validation rule script. Enter a name and open the script.
In the script, you will need to fill a few things:
Properties | Description |
---|---|
HelpBoxText | The text displayed when this validation rule fails. |
MessageType | The type of the message displayed when this validation rule fails. The types are Info, Warning, Error and None. |
ValidationRuleState | The current state of the validation rule. Can be either NotValidated, NotValid or Valid. |
Methods | Description |
---|---|
ValidateRule(Object content) | How this rule process the validation. This method should also set the |
You can also add any fields or methods you might need for the validation.
When your validation rule script is filled, return to Unity. Right click in the project view and select "Create/UGC Bridge/Validation Rule Assets/
Customize user authentication
To create a new user authentication step, right click in the project view and select "Create/UGC Bridge/Step Templates/New User Authentication Step Script". This will create a new user authentication step script. Enter a name and open the script.
In the script, you will need to fill a few things:
Methods | Description |
---|---|
OnGUI | If the user authentication requires a field or a button in the user authentication section of the main panel, you can draw it here. Leave it empty if no UI is required. |
SessionSignIn | This method is called when a editor session is refreshed, to allow player automatic sign in if it was already logged in. |
You can also add any fields or methods you might need for the user authentication.
When your user authentication step script is filled, return to Unity. Right click in the project view and select "Create/UGC Bridge/Step Assets/
Customize content selection
To create a new content selection step, right click in the project view and select "Create/UGC Bridge/Step Templates/New Content Selection Step Script". This will create a new content selection step script. Enter a name and open the script.
In the script, you will need to fill a few things:
Properties | Description |
---|---|
SourceContentFilePath | File path of the content selected for publishing. |
RepresentationContentFilePath | File path of the representation of the selected content for publishing. Will only be used if RequireRepresentation is set to true |
RequireRepresentation | Check to see if we need the representation to be built before publishing the content. Override it if the source content won't be used as-is at runtime. Default is set to false. |
Methods | Description |
---|---|
OnGUI() | If the content selection requires a field in the main panel, you can draw it here. Leave it empty if no UI is required. |
You can also add any fields or methods you might need for the content selection.
When your content selection step script is filled, return to Unity. Right click in the project view and select "Create/UGC Bridge/Step Assets/
Customize content publishing
To create a new content publishing step, right click in the project view and select "Create/UGC Bridge/Step Templates/New Content Publishing Step Script". This will create a new content publishing step script. Enter a name and open the script.
In the script, you will need to fill a few things:
Properties | Description |
---|---|
ContentPublishingData | This is the data used to publish content. The property is already taken care of in the base script. |
Methods | Description |
---|---|
OnGUI() | This is where the |
PublishAsync(Action |
This function should fire the asynchronous publish calls and use the corresponding callbacks in case of errors or success. |
You can also add any fields or methods you might need for the content publishing.
When your content publishing step script is filled, return to Unity. Right click in the project view and select "Create/UGC Bridge/Step Assets/
Customize content validation
To create a new content validation step, right click in the project view and select "Create/UGC Bridge/Step Templates/New Content Validation Step Script". This will create a new content validation step script. Enter a name and open the script.
In the script, you will need to fill a few things:
Properties | Description |
---|---|
ValidationRules | This is list of validation that must be valid before a content is published. |
Methods | Description |
---|---|
OnGUI() | This is where you could draw some information before the validation rules GUI is drawn. |
ValidateContent() | This is where the validation rules are checked which is called with the validation window and before a content is published. |
You can also add any fields or methods you might need for the content validation.
When your content validation step script is filled, return to Unity. Right click in the project view and select "Create/UGC Bridge/Step Assets/
Customize content building
To create a new content building step, right click in the project view and select "Create/UGC Bridge/Step Templates/New Content Building Step Script". This will create a new content building step script. Enter a name and open the script.
In the script, you will need to fill a few things:
Properties | Description |
---|---|
OnContentBuiltEvent | Event raised when the content is built into asset bundle. |
Methods | Description |
---|---|
Build(Object selection, string outputFolderPath) | Build the selected content in the output folder. |
You can also add any fields or methods you might need for the content building.
When your content building step script is filled, return to Unity. Right click in the project view and select "Create/UGC Bridge/Step Assets/
Recommendation
The current recommendation for packaging and providing a UGC Editor Bridge project to a content creator would be to:
- Create an empty Unity project
- Configure UGC Bridge settings with the project id and environment
- Setup the steps as you need them
- Zip the project and give that archive to your content creators