UGC Bridge
UGC Bridge is designed for game developers to publish a plugin (Editor Connector) that bridges the Unity Editor and the UGC services, so custom content can be published directly from the Unity Editor. The plugin is found in the Unity Cloud Dashboard in the set up process.
The benefits of Unity Bridge are:
- A tool for advanced creators: Leverage the Unity Editor to create and publish assets directly to your title.
- Validate content: Validate functionality before creators post, for example, to check if there are two flags in a capture the flag map.
- Use authentication: Players can post using the authentication they use for your title.
- Extend: Add functionality and flows that fit your title by extending the distributable package.
The plugin scopes the assets within the project asset folder that are relevant for the publish step. For each defined content type, the plugin includes multiple types of Unity assets.
The game developer creates a Unity project, adds the Unity Bridge plugin, and sets it up for content creators. The developer typically adds a scene, lighting, a camera, a sample level, level edition tool, and enough game code to ensure the content can be tested by the creator. The developer adds validation rules to Unity Bridge before it’s uploaded to the service and optionally writes their own serialization logic to package the content in a format the game understands.
The developer then publishes the Unity project so their community can download it. Developers provide instructions on the Unity version and add a download link to the project. Upload the download link on your website and set the download URL for User Generated Content on the Web Portal Setup page. A content creator can then download the Unity project using that link, open it in the required Unity version, and is ready to create content.
Set up UGC Bridge
Follow these steps to integrate UGC Bridge in your project
- In the Unity Cloud Dashboard, select the Projects tab and select + New to add a new project.
- Enter a name and Create project.
- Copy your project ID.
- Go to User Generated Content > Setup Guide.
- Download the SDK and open Unity Hub.
- In the Unity Editor, select New project.
- Give it a name and select New project.
- Open the project.
- Go to Window > Package Manager.
- Select Add package from tarball....
- Select the SDK downloaded in step 5 and select Open.
- You’ll be asked to Link your project. Select Project Settings.
- Select your Organization and Project, then select Link project id.
- Choose if your app targets children under 13 and close the window.
- In the Package Manager, search for ‘ugc’ and select User Generated Content Bridge.
- Select Install.
- Select Services > Settings.
- In UGC Bridge, enter the Project ID copied in step 3 and select Fetch.
- Select your content type.
- Select Services > UGC > Publishing Panel. This brings up UGC Bridge.
- Select Anonymous Sign in.
- Go to Window > Asset Store > Search online.
- In our example we use a ball. Select Open in Unity.
- In the Editor, go to Window > Package Manager.
- In the Packages go to the Unity Registry dropdown and select My Assets.
- Select your asset and select Import.
- In the Project folder, right-click and select Assets > Create Empty.
- Select GameObject > Prefab > Replace.
- Select your asset, which appears in the Scene. In our example we made the ball bigger.
- In the Unity Cloud Dashboard, select User Generated Content > Service Settings.
- Create tags select Close.
- In the Editor, go to Services > UGC > Publishing Panel.
- Give your content a name and description, add tags, then select Publish.
- In the Unity Cloud Dashboard, to to User Generated Content > Content to see your new content.
Publishing
Assets are published and uploaded as a ‘source’ format using the original Unity project source asset format (YAML), or other lossless serialization formats (for example, USD or JSON).
Content comes in an Edit-Time format and optionally in a run-time format (Representation). Content is created, updated, and deleted by the creator (or game studio). UGC is format agnostic, and is not enforced on the game developer. When the creator is ready to publish, they can choose to publish immediately, or add the content to a moderation queue. The developer sets the path of where the content goes.
If a game needs a runtime version of each content, such as one per supported platform or geographical market, the creator can create them as part of the publishing process. Representations can be tagged for later retrieval. For example, an in-game level editor stores content as a JSON file. The creator designs the level and publishes it. The game developer creates a runtime version of that content when it's modified: a new scene, lighting, meshes, textures, add sounds, etc. The game developer creates one or more representations of that level and tags each with their respective targeted platform and market. They can also handle censorship for a given region or platform.
The following Unity asset types are supported in source format: scenes, prefabs, meshes, textures, materials, audio clips, terrains, font, lights, particle systems, and animations (including animation controllers). A creator can browse any uploaded content.
In the Editor menu, there’s a top-level menu entry called UGC Tools (this is customizable). The menu items are:
- Main panel (open the main panel window)
- Document (online or open from local folder)
- Build and validation
- Content management (post MVP)
As a game developer, follow these steps to set up publishing:
- Download the template from the Package Manager, and add User Generated Content Bridge to a Unity project. (The game developer creates a new Unity project, and adds UGC Bridge, custom tools, and custom validation and publishing logic before uploading to their website for creators to download.)
- Read the documentation (quick start guide).
- Customize the project-specific areas that need to be configured.
- Build and run the editor plugin to test.
- Release to the user base.
As a content creator, follow these steps to create and publish your content:
- Installation:
- Download the connector plugin (using the same version the game requires) and installation instructions (both from the game developer), which specifies the version of Unity you must use to be compatible with the plugin.
- Download the template Unity project from the game’s website.
- Install the plugin.
- Onboarding:
- Open the configuration panel.
- Log in using the supported identity system, or provide the necessary access token credentials. All identity providers are exposed in the Unity Cloud Dashboard at Player Authentication > Identity Providers.
- Creation:
- Create content as usual inside Unity.
- Local test:
- Run and test in play mode as usual inside Unity, for example, ‘local test’, which works for simple content that can be previewed and tested directly. This is the minimum needed to test the content in play mode.
- For content that requires full game runtime, see post-publish steps below.
- Validation:
- Run the build and process to check for errors. Run all validation rules the game developer set on that type of content in the project. For example, you can create cosmetics such as a hat and a cape. To validate a hat, you might check its fits on all characters' heads, and is no taller than X pixels to prevent clipping issues. The cape has similar dimensions and restrictions plus requires a certain structure to be animated properly.
- Publishing:
- Open the publishing dialog or panel.
- Pull in a screenshot automatically from the scene camera (which camera provided is configurable), or manually assign a screenshot.
- Fill in the common metadata fields (title, description, tags).
- If validation failed: give all reasons.
- If validation passes: upload to the service.
- Upload content to UGC Service
- If one or more runtime representation are needed, upload and tag them.