Skip to main content

Reward Users with Custom Wearables

This tutorial will show you how you can submit a wearable asset to the Genies Hub and reward it to a user during gameplay.

It will cover these topics:

  • Submitting a wearable asset to Genies Hub.
  • An overview of the asset review process.
  • Gifting the published asset to a player.

Create a Wearable Asset

Follow the Wearable Creation Guidelines to create your own wearable asset.

info

For this tutorial it is not required to create your own wearable asset. This tutorial will use an asset from the free Genies Clothing Pack as an example.

Download a Wearable Asset

Add the Clothing Pack Package

Open the Alpine Winter Set - Genies Avatar Clothing Pack in the Unity Asset Store. Click the Add to My Assets button.

Add Asset

Open the Package in Unity

Click the Open in Unity button to open the package's page within the Unity Editor.

Open Unity

note

The Unity Editor needs to be opened for this action to work.

Download the Package

In the Package Manager window, click the Download button at the top right.

Download Package

Import the Package

Once downloaded, click the Import button at the top right.

Import Package

Import All Assets

The import window will appear. Click the All button at the top left and then click the Import button at the bottom right.

Import All

Upload the Wearable Asset

Open Genies Hub

Log into the Genies Hub. Open the Genies app page that is linked to your current Unity project. Press the Upload an Asset button.

Upload Asset

Add the Wearable Details

Add in the necessary details for your wearable asset. Click the Next button.

Hoodie Details

tip

The Wearable Type is important to accurately tag, so that the item appears in the proper inventory slot. The Name cannot be changed once submitted.

Find the Asset Files

In order to upload a wearable, you will need 5 files.

  1. The FBX file of the 3D model
  2. The Albedo Transparency Map
  3. The Metallic Smoothness Map
  4. The Normal Map
  5. The RGBA Mask

Open your file directory to the Unity project root folder. Then open the Assets > Genies > AlpineWinter > hoodie-0001-alpineWinter folder to find all 5 asset files.

File Directory

Upload the Asset Files

Upload the 5 asset files into the appropriate fields. Once all 5 assets are added, the 3D Preview screen should display the asset. If it looks correct, then click the Submit button.

Upload Hoodie

Wait for Asset Processing

Once you submit your asset, you will need to wait a couple minutes for the asset to process through our pipeline.

Upload Done

info

There are several stages the asset goes through as it is being processed:

  • Queued: The asset is currently in queue to be processed.
  • Processing: The asset is currently being processed in our content pipeline.
  • In Development: The asset is ready for you to submit for review.
  • Under Review: The asset is currently in our review pipeline. This may take up to 24 hours to manually review.
  • Rejected: The asset did not pass our content review. Here, you will also see a note on why your asset was rejected.
  • Published: The asset was approved and can now be given to a user. You will need to Copy Asset ID to use within Unity.

Asset States

Submit for Review

Once your asset has been processed, click the Submit for review button. This is a manual review by Genies so it may take up to 24 hours to be reviewed.

Submit Review

tip

Reach out to Genies Support page if you have any questions about your upload review.

Publish the Asset

Once your asset has been reviewed and you see the Approved status, you can press the Publish button, and your asset will be available to be gifted!

Publish Hoodie

Gift the Asset to Yourself

Download the Debug SDK Functions Sample Scene

Download the Debug SDK Functions sample scene. Play the scene, log into your Genies account, load a default Avatar, and open the Avatar Editor. You should not see your wearable asset yet because it has not been given.

No Hoodie

tip

Follow the Debug SDK Functions sample scene page if you need help downloading and using this sample scene.

Copy the Asset ID

In the Genies app page, press the Copy Asset ID button.

Copy ID

Paste the Asset ID

In the Unity Editor, play the Debug SDK Functions sample scene. Once logged in, paste the asset ID into the Asset ID to Grant input field in the SDK Functions Debugger component.

Paste ID

Grant the Asset

Then click the Give Asset to User button in the SDK Functions Debugger component.

Give Asset

Confirm the Asset is Granted

A dialogue window should appear that confirms the asset has been given to the user.

Grant Successful

Equip the Custom Wearable

Stop Play mode and then replay the sample scene. Open the Avatar Editor and you should now see the custom wearable and be able to equip it.

Yes Hoodie

Gift the Asset to Users

Copy the Asset ID

In the Genies app page, press the Copy Asset ID button.

Copy ID

Grant the Asset

The API method GiveAssetToUserAsync requires the asset ID string. It will return a results object to determine if it succeeded and a reason if it failed.

// Function definition for gifting an asset
private async GiveAssetToUserAsync(string assetId)
{
var result = await Genies.Sdk.AvatarSdk.GiveAssetToUserAsync(assetId);
if(result.succeeded) {
Debug.Log("Asset has been granted to user!");
}else{
Debug.Log("Error: Asset could not be granted. Reason: " + result.failReason);
}
}

// Function to call in code
GiveAssetToUserAsync("pasteAssetIdHere");

Once the asset is given to a user, they will then see it in their inventory.