Using UGC for Official In-Game Contents
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.
In this guide, you will learn how to utilize UGC service to create the official in-game content, display it within the game client, and modify it according to your game use case.
Goals
The goals of this section are to:
- Provide an understanding and overview of UGC for Official in-game content
- Provide an understanding of how to create Official in-game content in the Admin Portal
- Provide an understanding of how to modify Official in-game content in the Admin Portal
- Provide an understanding of how to display Official in-game content in the Admin Portal
- Provide an understanding of how to delete Official in-game contents in the Admin Portal
- Explain how to utilize the AccelByte SDK to display UGC Official in-game contents
Prerequisites
You will need access to:
- The AccelByte Admin Portal
- The AccelByte Unreal or Unity SDK
- The AccelByte UGC API documentation for further reference
Create Official in-game content In Admin Portal
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 Admin Portal.
Here is the step to creating a channel to store the official in-game content using Admin Portal:
Go to the UGC Management menu and click Creators
Select the Official tab and click the View button in Creator Admin
Click New Channel button and create UGC Channel
Input your Channel Name and click Add button
Create Official In-game Content into the 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.
Here is the step to create the UGC Official In-game Content using Admin Portal:
After creating the UGC Channel, we could choose the channel and then click the View button
Click New Content button and create UGC Content
We need to input Content Name, Select Type for the content, Select Subtype for the content, add the content file, and add content preview. We also can add Tag and Additional Fields for a better explanation of the UGC official in-game content
After completing the data then Click Add button
Official in-game content will automatically be created from the Admin Portal. After the official content is created then you can display the content or the player can use it within the game
Modify Official in-game content In Admin Portal
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.
Here is the step to modify official in-game content in UGC using Admin Portal:
Select the UGC Channel (a channel that we use to store the UGC content before) and click the View button
Look at the UGC Content that we have created, then click the View button
We can update the UGC official in-game content basic information and we also could upload New Screenshots of the content to make a better result for the Official In-game content
Display Official in-game content in the Admin Portal
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.
Here is the step to display the UGC official in-game content using Admin Portal:
Go to the UGC Management menu and click Contents
We can view a list of the UGC Content created by the both admin and the player’s creators in the Content List Admin Portal
Select the UGC Official In-game content and click the View button to display the content from Admin Portal
Displaying the Official in-game content by the share code using Client SDK
This example below shows you how to retrieve the Official in-game content using the share code
Retreive official in-game content using the share code V1
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ShareCode = "YourUGCShareCode";
ApiClient->UGC.GetContentByShareCode(ShareCode, THandler<FAccelByteModelsUGCContentResponse>::CreateLambda([](const FAccelByteModelsUGCContentResponse& Result)
{
// Do something if GetContentByShareCode has been successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetContentByShareCode has an error
UE_LOG(LogTemp, Log, TEXT("Error GetContentByShareCode, Error Code: %d Error Message: %s"), ErrorCode, *ErrorMessage);
}));
string shareCode = "YourUGCShareCode";
AccelBytePlugin.GetUgc().GetContentByShareCode(shareCode, result =>
{
if (result.IsError)
{
// Do something if GetContentByShareCode has an error
Debug.Log($"Error GetContentByShareCode, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if GetContentByShareCode has been successful
}
});
Retreive official in-game content using the share code V2
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ShareCode = "YourUGCShareCode";
ApiClient->UGC.GetV2ContentByShareCode(ShareCode, THandler<FAccelByteModelsUGCContentResponseV2>::CreateLambda([](const FAccelByteModelsUGCContentResponseV2& Result)
{
// Do something if GetV2ContentByShareCode has been successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetV2ContentByShareCode has an error
UE_LOG(LogTemp, Log, TEXT("Error GetV2ContentByShareCode, Error Code: %d Error Message: %s"), ErrorCode, *ErrorMessage);
}));
string shareCode = "YourUGCShareCode";
AccelBytePlugin.GetUgc().GetV2ContentByShareCode(shareCode, result =>
{
if (result.IsError)
{
// Do something if GetV2ContentByShareCode has an error
Debug.Log($"Error GetV2ContentByShareCode, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if GetV2ContentByShareCode has been successful
}
});
Displaying the List of Official in-game content using Client SDK
This example below shows you how to retrieve the List of Official in-game content
Retreive 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 has been successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if SearchContents has an error
UE_LOG(LogTemp, Log, TEXT("Error SearchContents, Error Code: %d Error Message: %s"), ErrorCode, *ErrorMessage);
}), 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
};
AccelBytePlugin.GetUgc().SearchContent(filterRequest, result =>
{
if (result.IsError)
{
// Do something if SearchContent has an error
Debug.Log($"Error SearchContent, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if SearchContent has been successful
}
});
Displaying the Official in-game content by the content ID using Client SDK
This example below shows you how to retrieve the Official in-game content using the content ID
Retreive official in-game content using the content ID V1
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ContentId = "YourUGCContentId";
ApiClient->UGC.GetContentByContentId(ContentId, THandler<FAccelByteModelsUGCContentResponse>::CreateLambda([](const FAccelByteModelsUGCContentResponse& Result)
{
// Do something if GetContentByContentId has been successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetContentByContentId has an error
UE_LOG(LogTemp, Log, TEXT("Error GetContentByContentId, Error Code: %d Error Message: %s"), ErrorCode, *ErrorMessage);
}));
string shareCode = "YourUGCContentId";
AccelBytePlugin.GetUgc().GetContentByContentId(shareCode, result =>
{
if (result.IsError)
{
// Do something if GetContentByContentId has an error
Debug.Log($"Error GetContentByContentId, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if GetContentByContentId has been successful
}
});
Retreive official in-game content using the content ID V2
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ContentId = "YourUGCContentId";
ApiClient->UGC.GetV2ContentByContentId(ContentId, THandler<FAccelByteModelsUGCContentResponseV2>::CreateLambda([](const FAccelByteModelsUGCContentResponseV2& Result)
{
// Do something if GetV2ContentByContentId has been successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetV2ContentByContentId has an error
UE_LOG(LogTemp, Log, TEXT("Error GetV2ContentByContentId, Error Code: %d Error Message: %s"), ErrorCode, *ErrorMessage);
}));
string shareCode = "YourUGCContentId";
AccelBytePlugin.GetUgc().GetV2ContentByContentId(shareCode, result =>
{
if (result.IsError)
{
// Do something if GetV2ContentByContentId has an error
Debug.Log($"Error GetV2ContentByContentId, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if GetV2ContentByContentId has been successful
}
});
Displaying the List of Official in-game content through official channel using Client SDK
This example below shows you how to retrieve the List of Official in-game content through official channel
Retreive official in-game content through official channel V1
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ChannelId = "YourUGCChannelId";
FString ContentName = "";
FString CreatorName = "";
FString Type = "";
FString Subtype = "";
TArray<FString> Tags = {};
bool IsOfficial = true;
FString UserId = "";
ApiClient->UGC.SearchContentsSpecificToChannel(ChannelId, ContentName, CreatorName, Type, Subtype,
Tags, IsOfficial, UserId, THandler<FAccelByteModelsUGCSearchContentsPagingResponse>::CreateLambda([](const FAccelByteModelsUGCSearchContentsPagingResponse& Result)
{
// Do something if SearchContentsSpecificToChannel has been successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if SearchContentsSpecificToChannel has an error
UE_LOG(LogTemp, Log, TEXT("Error SearchContentsSpecificToChannel, Error Code: %d Error Message: %s"), ErrorCode, *ErrorMessage);
}));
string channelId = "YourUGCChannelId";
SearchContentRequest searchContentRequest = new SearchContentRequest()
{
isOfficial = true
};
AccelBytePlugin.GetUgc().SearchContentsSpesificToChannel(channelId, searchContentRequest, result =>
{
if (result.IsError)
{
// Do something if GetContentByContentId has an error
Debug.Log($"Error GetContentByContentId, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if GetContentByContentId has been successful
}
});
Retreive official in-game content through official channel V2
- Unreal Engine
- Unity
FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();
FString ChannelId = "YourUGCChannelId";
ApiClient->UGC.SearchV2ContentsSpecificToChannel(ChannelId, THandler<FAccelByteModelsUGCSearchContentsPagingResponseV2>::CreateLambda([](const FAccelByteModelsUGCSearchContentsPagingResponseV2& Result)
{
// Do something if SearchV2ContentsSpecificToChannel has been successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if SearchV2ContentsSpecificToChannel has an error
UE_LOG(LogTemp, Log, TEXT("Error SearchV2ContentsSpecificToChannel, Error Code: %d Error Message: %s"), ErrorCode, *ErrorMessage);
}));
string channelId = "YourUGCChannelId";
AccelBytePlugin.GetUgc().SearchV2ContentsSpecificToChannel(channelId, result =>
{
if (result.IsError)
{
// Do something if SearchV2ContentsSpecificToChannel has an error
Debug.Log($"Error SearchV2ContentsSpecificToChannel, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if SearchV2ContentsSpecificToChannel has been successful
}
});
Delete Official In-game Contents in the Admin Portal
If you want to delete the UGC official in-game contents from Admin Portal, we can follow this step
Here is the step to delete the UGC official in-game content using Admin Portal:
Select the UGC Channel (a channel that we use to store the UGC content before) and click the View button
Look at the UGC Content that we have created, then click the View button
Click the Delete Content button
Type DELETE text in the field bar and Click the Delete button
Further Reading
After configuring UGC's official in-game content, you can start integrating it into your game. You can also manage a UGC such as manage Tag, Type and Subtype, Filter content, etc. Please refer to the documentation below
- Manage Advance Filter for Content Browsing
- Manage UGC to Your Game Player