docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IUgcService

    This interface describes the UGC related methods available to game clients.

    Namespace: Unity.Services.Ugc
    Assembly: Unity.Services.Ugc.dll
    Syntax
    public interface IUgcService

    Methods

    ApproveContentAsync(string)

    Approve content that needed moderation.

    Declaration
    Task<Content> ApproveContentAsync(string contentId)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    Returns
    Type Description
    Task<Content>

    The approved content

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode ProjectInactive if the project was deleted.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    CreateContentAsync(CreateContentArgs)

    Create a new content in a project environment

    Declaration
    Task<Content> CreateContentAsync(CreateContentArgs createContentArgs)
    Parameters
    Type Name Description
    CreateContentArgs createContentArgs

    Contains all the parameters of the request

    Returns
    Type Description
    Task<Content>

    The content that will be eventually available once the upload has been uploaded.

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode InvalidStream if asset or thumbnail streams are in invalid states.
    • Throws with ErrorCode UploadContentFailed if asset and/or thumbnail uploads requests failed. Check inner exceptions for more details
    • Throws with ErrorCode InvalidTagAssignment if unknown tag ids were passed to the request.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    CreateContentVersionAsync(string, Stream, Stream)

    Create a new version of a content.

    Declaration
    Task<Content> CreateContentVersionAsync(string contentId, Stream asset, Stream thumbnail = null)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    Stream asset

    The stream containing the binary payload of the content

    Stream thumbnail

    The stream containing the image representing the content

    Returns
    Type Description
    Task<Content>

    The content that will be eventually available once the upload has been uploaded.

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode InvalidStream if asset or thumbnail streams are in invalid states.
    • Throws with ErrorCode UploadContentFailed if asset and/or thumbnail uploads requests failed. Check inner exceptions for more details
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    • Throws with ErrorCode ContentUnauthorized if the current user isn't the creator of the content.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    CreateRepresentationAsync(CreateRepresentationArgs)

    Create a new representation of a content

    Declaration
    Task<Representation> CreateRepresentationAsync(CreateRepresentationArgs createRepresentationArgs)
    Parameters
    Type Name Description
    CreateRepresentationArgs createRepresentationArgs

    Contains all the parameters of the request

    Returns
    Type Description
    Task<Representation>

    The created representation

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode InvalidTagAssignment if unknown tag ids were passed to the request.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    CreateRepresentationVersionAsync(string, string, Stream)

    Create a representation version.

    Declaration
    Task<RepresentationVersion> CreateRepresentationVersionAsync(string contentId, string representationId, Stream asset)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    string representationId

    The representation identifier

    Stream asset

    The stream containing the binary payload of the representation version

    Returns
    Type Description
    Task<RepresentationVersion>

    The representation.

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode InvalidStream if asset or thumbnail streams are in invalid states.
    • Throws with ErrorCode UploadContentFailed if asset and/or thumbnail uploads requests failed. Check inner exceptions for more details
    • Throws with ErrorCode RepresentationNotFound if the API call failed due requested content not being found.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    CreateSubscriptionAsync(string)

    Subscribe to the content for the current user

    Declaration
    Task<Subscription> CreateSubscriptionAsync(string contentId)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    Returns
    Type Description
    Task<Subscription>

    The created subscription

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    • Throws with ErrorCode UserAlreadySubscribed if the user is already subscribed to the content.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    DeleteContentAsync(string)

    Delete a content

    Declaration
    Task DeleteContentAsync(string contentId)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    Returns
    Type Description
    Task

    A task

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    • Throws with ErrorCode ContentUnauthorized if the current user isn't the creator of the content.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    DeleteRepresentationAsync(DeleteRepresentationArgs)

    Delete representation

    Declaration
    Task DeleteRepresentationAsync(DeleteRepresentationArgs deleteRepresentationArgs)
    Parameters
    Type Name Description
    DeleteRepresentationArgs deleteRepresentationArgs

    The id of the representation to delete

    Returns
    Type Description
    Task

    A task

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    DeleteSubscriptionAsync(string)

    Unsubscribe to the content for the current user

    Declaration
    Task DeleteSubscriptionAsync(string contentId)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    Returns
    Type Description
    Task

    A task

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    DownloadContentDataAsync(Content, bool, bool)

    Download data and/or thumbnail of a content

    Declaration
    Task DownloadContentDataAsync(Content content, bool downloadContent, bool downloadThumbnail)
    Parameters
    Type Name Description
    Content content

    The content that will have its data downloaded

    bool downloadContent

    True if we want to download the content's data

    bool downloadThumbnail

    True if we want to download the content's thumbnail

    Returns
    Type Description
    Task

    The downloaded data will be put in the content parameter so this call returns nothing.

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetContentAsync(GetContentArgs)

    Get a specific content.

    Declaration
    Task<Content> GetContentAsync(GetContentArgs getContentArgs)
    Parameters
    Type Name Description
    GetContentArgs getContentArgs

    Contains all the parameters of the request

    Returns
    Type Description
    Task<Content>

    The requested content

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode ProjectHidden if the project isn't onboarded/active. Check if the project is linked and enabled in the dashboard.
    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    • Throws with ErrorCode ContentUnauthorized if the current user isn't the creator of the content and its visibility is private.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetContentTrendsAsync(GetContentTrendsArgs)

    Get content by ContentTrendType

    Declaration
    Task<PagedResults<Content>> GetContentTrendsAsync(GetContentTrendsArgs getContentTrendsArgs = null)
    Parameters
    Type Name Description
    GetContentTrendsArgs getContentTrendsArgs

    The details of the search request

    Returns
    Type Description
    Task<PagedResults<Content>>

    A list of contents of this trend type, with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetContentVersionsAsync(GetContentVersionsArgs)

    Get content versions of a content.

    Declaration
    Task<PagedResults<ContentVersion>> GetContentVersionsAsync(GetContentVersionsArgs getContentVersionsArgs)
    Parameters
    Type Name Description
    GetContentVersionsArgs getContentVersionsArgs

    Contains all the parameters of the request

    Returns
    Type Description
    Task<PagedResults<ContentVersion>>

    The list of versions associated with the content with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetContentsAsync(GetContentsArgs)

    Get all content from a project specific environment. Content with visibility set to Hidden or with ModerationStatus different from Approved won't be returned. Deleted contents and ones that haven't finished uploading won't be returned either.

    Declaration
    Task<PagedResults<Content>> GetContentsAsync(GetContentsArgs getContentsArgs = null)
    Parameters
    Type Name Description
    GetContentsArgs getContentsArgs

    The details of the search request

    Returns
    Type Description
    Task<PagedResults<Content>>

    A list of contents from the environment with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetPlayerContentsAsync(GetPlayerContentsArgs)

    Get all content created by the current signed in player

    Declaration
    Task<PagedResults<Content>> GetPlayerContentsAsync(GetPlayerContentsArgs getPlayerContentsArgs = null)
    Parameters
    Type Name Description
    GetPlayerContentsArgs getPlayerContentsArgs

    The details of the search request

    Returns
    Type Description
    Task<PagedResults<Content>>

    A list of contents from the environment with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetRepresentationAsync(GetRepresentationArgs)

    Get a specific representation of a content

    Declaration
    Task<Representation> GetRepresentationAsync(GetRepresentationArgs getRepresentationArgs)
    Parameters
    Type Name Description
    GetRepresentationArgs getRepresentationArgs

    Contains all the parameters of the request

    Returns
    Type Description
    Task<Representation>

    The representation

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetRepresentationVersionsAsync(GetRepresentationVersionsArgs)

    Get versions of a representation

    Declaration
    Task<PagedResults<RepresentationVersion>> GetRepresentationVersionsAsync(GetRepresentationVersionsArgs getRepresentationVersionsArgs)
    Parameters
    Type Name Description
    GetRepresentationVersionsArgs getRepresentationVersionsArgs

    The details of the search request

    Returns
    Type Description
    Task<PagedResults<RepresentationVersion>>

    A list of versions of a specific representation with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetRepresentationsAsync(GetRepresentationsArgs)

    Get representations of a content

    Declaration
    Task<PagedResults<Representation>> GetRepresentationsAsync(GetRepresentationsArgs getRepresentationsArgs)
    Parameters
    Type Name Description
    GetRepresentationsArgs getRepresentationsArgs

    The details of the search request

    Returns
    Type Description
    Task<PagedResults<Representation>>

    A list of representations of specific content with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetSubscriptionsAsync(GetSubscriptionsArgs)

    Get all subscriptions of the current user

    Declaration
    Task<PagedResults<Subscription>> GetSubscriptionsAsync(GetSubscriptionsArgs getSubscriptionsArgs)
    Parameters
    Type Name Description
    GetSubscriptionsArgs getSubscriptionsArgs

    The details of the search request

    Returns
    Type Description
    Task<PagedResults<Subscription>>

    A list of subscriptions of the current user with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetTagsAsync()

    Get a list of tags associated with the project

    Declaration
    Task<List<Tag>> GetTagsAsync()
    Returns
    Type Description
    Task<List<Tag>>

    A list of tags

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    GetUserContentRatingAsync(string)

    Get the rating of a content.

    Declaration
    Task<ContentUserRating> GetUserContentRatingAsync(string contentId)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    Returns
    Type Description
    Task<ContentUserRating>

    The rating of the content

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    • Throws with ErrorCode ContentNotRated if the content doesn't have ratings yet.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    IsSubscribedToAsync(string)

    Check if the current user is subscribed to the content

    Declaration
    Task<bool> IsSubscribedToAsync(string contentId)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    Returns
    Type Description
    Task<bool>

    true if the content is subscribed to, false otherwise

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    RejectContentAsync(string)

    Reject content that needed moderation.

    Declaration
    Task<Content> RejectContentAsync(string contentId)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    Returns
    Type Description
    Task<Content>

    The rejected content

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode ProjectInactive if the project was deleted.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    ReportContentAsync(ReportContentArgs)

    Report a content

    Declaration
    Task<Content> ReportContentAsync(ReportContentArgs reportContentArgs)
    Parameters
    Type Name Description
    ReportContentArgs reportContentArgs

    The details of the report request

    Returns
    Type Description
    Task<Content>

    The reported content

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode ProjectInactive if the project was deleted.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    SearchContentModerationAsync(SearchContentModerationArgs)

    Search for content that needs moderation in the project.

    Declaration
    Task<PagedResults<Content>> SearchContentModerationAsync(SearchContentModerationArgs searchContentModerationArgs)
    Parameters
    Type Name Description
    SearchContentModerationArgs searchContentModerationArgs

    The details of the search request

    Returns
    Type Description
    Task<PagedResults<Content>>

    A list of contents requiring moderation with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    SearchRepresentationsAsync(SearchRepresentationsArgs)

    Search representations within a project

    Declaration
    Task<PagedResults<Representation>> SearchRepresentationsAsync(SearchRepresentationsArgs searchRepresentationsArgs)
    Parameters
    Type Name Description
    SearchRepresentationsArgs searchRepresentationsArgs

    The details of the search request

    Returns
    Type Description
    Task<PagedResults<Representation>>

    A list of representations within a project with pagination information

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    SubmitUserContentRatingAsync(string, float)

    Submit a user rating of a content

    Declaration
    Task<ContentUserRating> SubmitUserContentRatingAsync(string contentId, float rating)
    Parameters
    Type Name Description
    string contentId

    The content identifier

    float rating

    The rating value

    Returns
    Type Description
    Task<ContentUserRating>

    The rating

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    UpdateContentDetailsAsync(UpdateContentDetailsArgs)

    Update a specific content details.

    Declaration
    Task<Content> UpdateContentDetailsAsync(UpdateContentDetailsArgs updateContentDetailsArgs)
    Parameters
    Type Name Description
    UpdateContentDetailsArgs updateContentDetailsArgs

    The details of the update request

    Returns
    Type Description
    Task<Content>

    The updated content

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode ContentNotFound if the API call failed due requested content not being found.
    • Throws with ErrorCode ContentUnauthorized if the current user isn't the creator of the content.
    • Throws with ErrorCode InvalidTagAssignment if unknown tag ids were passed to the request.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.

    UpdateRepresentationAsync(UpdateRepresentationArgs)

    Update a specific representation.

    Declaration
    Task<Representation> UpdateRepresentationAsync(UpdateRepresentationArgs updateRepresentationArgs)
    Parameters
    Type Name Description
    UpdateRepresentationArgs updateRepresentationArgs

    The details of the update request

    Returns
    Type Description
    Task<Representation>

    The updated representation

    Exceptions
    Type Condition
    UgcException

    Thrown if request is unsuccessful due to UGC Service specific issues.

    • Throws with ErrorCode Unauthorized if the user is not authorized to perform this operation. Check if the project is linked and the user correctly authenticated.
    • Throws with ErrorCode NullResults if the request did not return any results. Check the request arguments.
    • Throws with ErrorCode RepresentationNotFound if the API call failed due requested representation not being found.
    • Throws with ErrorCode InvalidTagName if invalid tag names were passed to the request.
    RequestFailedException

    Thrown if request is unsuccessful due to common services issues.

    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server.
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)