Create UGC In-Game
Prerequisites
Create an asset candidate
// Name is required when creating an asset candidate
string name = "New Asset Candidate";
// The below additional variables are optional
Dictionary<string, string> kv_storage = new Dictionary<string, string>();
kv_storage.Add("key", "value"); // Optional
Dictionary<string, string> filters = new Dictionary<string, string>();
filters.Add("key", "value"); // Optional
Dictionary<string, string> data_entities = new Dictionary<string, string>();
filters.Add("data", "name"); // Optional
int context_id = -1; // Optional
string asset_candidate_id = "";
LootLockerSDKManager.CreatingAnAssetCandidate(name, kv_storage, filters, data_entities, (response) =>
{
if (response.success)
{
Debug.Log("Successfully created asset candidate with ID: " + response.asset_candidate_id);
// Save the asset_candidate_id for future requests
asset_candidate_id = response.asset_candidate_id;
}
else
{
Debug.Log("Error asset candidate");
}
});Working with the asset candidate
Delete the asset candidate
Add files to the asset candidate
Remove files from the Asset candidate
Update or add data to the asset candidate
Conclusion
Last updated
Was this helpful?



