公式ゲーム内コンテンツに UGC を使用する
Overview
UGC can be a powerful way to increase engagement, retention, and loyalty among your customers, as well as to attract new ones. UGC could also provide players with a rich and diverse experience that suits their preferences and play styles, by offering a variety of official in-game content, such as game character customization, new aspects of a weapon, a variety of levels, and so much more.
Official in-game content is content that is created by the developers or official content creators. Official in-game content can have many advantages for both the players and the developers such as:
- Ensuring quality, consistency, and compatibility of the content, as it is tested and verified by the developers.
- Providing guidance, support, and feedback for the players, as they can learn from the best practices and examples of the developers.
- Enhancing the reputation, credibility, and authority of the developers, as they can showcase their skills and expertise in creating content for the players.
This article walks you through how to:
- Create, display, modify, and delete official in-game content through the AccelByte Gaming Services (AGS) Admin Portal
- Display official in-game content in your game client using the AGS SDK
Prerequisites
You will need access to:
- The AGS Admin Portal
- The AGS Unreal or Unity SDK
- The AGS UGC API documentation for reference
Create official in-game content
Official in-game content is created by the developers or official content creators. Official in-game content can have many advantages for both the players and the developers providing guidance, support, and feedback for the players. The other advantage is we can enhance the reputation, credibility, and creativity of the admin creators. There are 2 Steps for creating the official content from Admin Portal. First, we need to create the Channel to store the content and after that, we could create the content.
Create a channel to store the official in-game content
UGC service manages official content based on the channel. Channel is a generic entity that is used to categorize official content. We can use the channel to group contents by region, language, build version, patch, content category, or any other cases that are needed for the game scenario. If you want to store your official content in the channel, you can create and manage it using the Admin Portal.
To create a UGC channel that will store official in-game content, follow these steps:
On the Admin Portal sidebar, go to Engagement > UGC > Content Creators.
On the Creators page, open the Official tab.
From the creators list, find the Admin creator and click on the View button next to it. The details page of the creator appears.
In the Channel section, click on the + New Channel button.
On the Add New Channel form, type in a name for the new channel and click Add.
Add official in-game content into a UGC Channel
If you want to create official in-game content in the UGC service, you need to create a file that contains all the customization options you have applied to your item. This file will store the information about your official in-game content.
To add official in-game content into a UGC channel, follow these steps:
On the Admin Portal sidebar, go to Engagement > UGC > Content Creators.
On the Creators page, open the Official tab.
From the creators list, find the creator with the channel you want to use and click on the View button next to it. The details page of the creator appears.
In the Channels section, find the channel you want to update and click on the View button next to it.
On the details page of the channel, click on the + New Content button.
On the Add new content form, fill in the required information:
- Type in the name for the new content.
- Specify the content type and subtype.
- Add the content file.
- Add content preview.
- (Optional) Add tags and additional fields to provide more details of the new content.
Click Add. After the content is created, you can display the content in your game, making it available to your players.
Modify official in-game content
After creating the UGC content, one way to make your official in-game contents file more attractive and informative is to add a screenshot that shows how it looks in the game. A screenshot can capture the visual effects and details that you have created with your content file.
To update official in-game content in a UGC channel, follow these steps:
On the Admin Portal sidebar, go to Engagement > UGC > Content Creators.
On the Creators page, open the Official tab.
From the creators list, find the creator with the channel you want to use and click on the View button next to it. The details page of the creator appears.
In the Channels section, find the channel with the content you want to update and click on the View button next to it.
From the contents list, find the content you want to update.
Update the content as needed. You can edit its basic information and upload new screenshots.
Display official in-game content
When creating the UGC official in-game content, the content result will auto-generate and admin creator can view their result through the Admin Portal. They can also display the created content in the game and the player can view or use it from the game.
To view UGC official in-game content, follow these steps:
On the Admin Portal sidebar, go to Engagement > UGC > Lookup UGC.
On the Lookup UGC page, you can search for UGC official in-game content using content name, ID, type, subtype, tags, share code, and user ID.
From the results, find and open the content you want to view.
Display official in-game content by share code using Client SDK
This example below shows you how to retrieve the official in-game content using the share code
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ShareCode = "YourUGCShareCode";
ApiClient->UGC.GetV2ContentByShareCode(ShareCode, THandler<FAccelByteModelsUGCContentResponseV2>::CreateLambda([](const FAccelByteModelsUGCContentResponseV2& Result)
{
// Do something if GetV2ContentByShareCode succeeds
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetV2ContentByShareCode fails
}));
string shareCode = "YourUGCShareCode";
UGC ugc = AccelByteSDK.GetClientRegistry().GetApi().GetUgc();
ugc.GetContentByShareCodeV2(shareCode, result =>
{
if (result.IsError)
{
// Do something if GetContentByShareCodeV2 fails
Debug.Log($"Error GetContentByShareCodeV2, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
return;
}
// Do something if GetContentByShareCodeV2 succeeds
});
Display list of official in-game content using Client SDK
This example shows how to retrieve a list of official in-game content.
Retrieve list of official in-game content
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ContentName = "Content Name";
FString CreatorName = "Creator Name";
FString Type = "Content Type";
FString Subtype = "Content Subtype";
TArray<FString> Tags = { "UGC Tag1", "UGC Tag2" };
bool bIsOfficial = true;
FString UserId = "Player User Id";
int32 Limit = 1000;
int32 Offset = 0;
EAccelByteUgcSortBy SortBy = EAccelByteUgcSortBy::DATE;
EAccelByteUgcOrderBy OrderBy = EAccelByteUgcOrderBy::DESC;
ApiClient->UGC.SearchContents(ContentName, CreatorName, Type, Subtype, Tags, bIsOfficial, UserId,
THandler<FAccelByteModelsUGCSearchContentsPagingResponse>::CreateLambda([](const FAccelByteModelsUGCSearchContentsPagingResponse& Result)
{
// Do something if SearchContents succeeds
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if SearchContents fails
}), SortBy, OrderBy, Limit, Offset);
SearchContentRequest filterRequest = new SearchContentRequest()
{
name = "Content Name",
type = "Content Type",
subtype = "Content Subtype",
tags = new[] { "UGC Tag1", "UGC Tag2" },
limit = 1000,
offset = 0,
sortBy = UGCSortBy.DATE,
orderBy = UGCOrderBy.DESC,
isOfficial = true
};
UGC ugc = AccelByteSDK.GetClientRegistry().GetApi().GetUgc();
ugc.SearchContent(filterRequest, result =>
{
if (result.IsError)
{
// Do something if SearchContent fails
Debug.Log($"Error SearchContent, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
return;
}
// Do something if SearchContent succeeds
});
Display official in-game content by content ID using Client SDK
This example shows how to retrieve official in-game content using a content ID.
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ContentId = "YourUGCContentId";
ApiClient->UGC.GetV2ContentByContentId(ContentId, THandler<FAccelByteModelsUGCContentResponseV2>::CreateLambda([](const FAccelByteModelsUGCContentResponseV2& Result)
{
// Do something if GetV2ContentByContentId succeeds
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetV2ContentByContentId fails
}));
string contentId = "YourUGCContentId";
UGC ugc = AccelByteSDK.GetClientRegistry().GetApi().GetUgc();
ugc.GetContentByContentIdV2(contentId, result =>
{
if (result.IsError)
{
// Do something if GetContentByContentIdV2 fails
Debug.Log($"Error GetContentByContentIdV2, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
return;
}
// Do something if GetContentByContentIdV2 succeeds
});
Display list of official in-game content through official channels using Client SDK
This example shows how to retrieve a list of official in-game content through official channels.
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ChannelId = "YourUGCChannelId";
ApiClient->UGC.SearchV2ContentsSpecificToChannel(ChannelId, THandler<FAccelByteModelsUGCSearchContentsPagingResponseV2>::CreateLambda([](const FAccelByteModelsUGCSearchContentsPagingResponseV2& Result)
{
// Do something if SearchV2ContentsSpecificToChannel succeeds
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if SearchV2ContentsSpecificToChannel fails
}));
string channelId = "YourUGCChannelId";
UGC ugc = AccelByteSDK.GetClientRegistry().GetApi().GetUgc();
ugc.SearchContentsSpecificToChannelV2(channelId, result =>
{
if (result.IsError)
{
// Do something if SearchContentsSpecificToChannelV2 fails
Debug.Log($"Error SearchContentsSpecificToChannelV2, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
return;
}
// Do something if SearchContentsSpecificToChannelV2 succeeds
});
Delete official in-game content
On the Admin Portal sidebar, go to Engagement > UGC > Content Creators.
On the Creators page, open the Official tab.
From the creators list, find the creator with the channel you want to update and click on the View button next to it. The details page of the creator appears.
In the Channels section, find the channel with the content you want to delete and click on the View button next to it.
From the contents list, find the content that you want to delete and click on the View button next to it.
On the details page of the content, click on the Delete Content button.
On the confirmation message, type DELETE and click the Delete button. The content is immediately deleted from the channel's contents list.
Next step
Create content tags, types, and sub-type that you can assign to the in-game content of your UGC channels. See Configure content tags, types, and subtypes for more information.