Class UgcBridgeUtilities
Utilities class for the UGC Bridge.
Inherited Members
Namespace: Unity.Services.Ugc.Bridge.Editor
Assembly: Unity.Services.Ugc.Bridge.Editor.dll
Syntax
public static class UgcBridgeUtilities
Methods
AddRepresentationVersion(ContentSelectionStep, Content, Representation)
Add a representation version to a Representation.
Declaration
public static Task<Representation> AddRepresentationVersion(ContentSelectionStep contentSelectionStep, Content content, Representation representation)
Parameters
Type | Name | Description |
---|---|---|
ContentSelectionStep | contentSelectionStep | The ContentSelectionStep to get the representation content file path from. |
Content | content | The Content to get the representation content file path from. |
Representation | representation | The Representation to add the representation version to. |
Returns
Type | Description |
---|---|
Task<Representation> | The Representation with the added representation version. |
BuildContentAsset(Object, string)
Build a content into Unity runtime format.
Declaration
public static void BuildContentAsset(Object obj, string outputFolderPath)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The content to build |
string | outputFolderPath | The filename where the asset bundle will be built |
CreateUnityPackage(string, string)
Create a Unity package from a given asset file path.
Declaration
public static string CreateUnityPackage(string assetFilePath, string fileName = "TempUnityPackage")
Parameters
Type | Name | Description |
---|---|---|
string | assetFilePath | The asset file path to create the Unity package from. |
string | fileName | The name of the Unity package. If not specified, the default name will be used. |
Returns
Type | Description |
---|---|
string | The path of the created Unity package. |
FindOrCreateSettings()
Find or create settings.
Declaration
public static UgcBridgeSettingsAsset FindOrCreateSettings()
Returns
Type | Description |
---|---|
UgcBridgeSettingsAsset | The UgcBridgeSettingsAsset. |
GetAssetBundleFileName(Object)
Get asset bundle filename from an object.
Declaration
public static string GetAssetBundleFileName(Object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to get the asset bundle filename from. |
Returns
Type | Description |
---|---|
string | The asset bundle filename. |
GetContentTypesOptions()
Get content types options.
Declaration
public static string[] GetContentTypesOptions()
Returns
Type | Description |
---|---|
string[] | The content types options. |
GetOrCreateRepresentation(ContentSelectionStep, Content, bool)
Get or create a representation from a ContentSelectionStep.
Declaration
public static Task<Representation> GetOrCreateRepresentation(ContentSelectionStep contentSelectionStep, Content content, bool skipSearch = true)
Parameters
Type | Name | Description |
---|---|---|
ContentSelectionStep | contentSelectionStep | The ContentSelectionStep to get or create the representation from. |
Content | content | The Content to get or create the representation from. |
bool | skipSearch | If |
Returns
Type | Description |
---|---|
Task<Representation> | The Representation matching the |
GetOwnedContent()
Fetch all contents owned by the current logged user.
Declaration
public static Task<List<Content>> GetOwnedContent()
Returns
Type | Description |
---|---|
Task<List<Content>> | A Content list of all the user published contents |
GetProjectUgcLabelToggles()
Fetch the tags from the project and build a LabelToggle array from it.
Declaration
public static Task<LabelToggle[]> GetProjectUgcLabelToggles()
Returns
Type | Description |
---|---|
Task<LabelToggle[]> | A LabelToggle array of all the project tags |
IsContentAssetBundleBuilt(string, string)
Check if an asset bundle is built.
Declaration
public static bool IsContentAssetBundleBuilt(string filename, string outputFolderPath)
Parameters
Type | Name | Description |
---|---|---|
string | filename | The filename of the asset bundle to check. |
string | outputFolderPath | The output folder path where the asset bundle will be built. |
Returns
Type | Description |
---|---|
bool |
|