Create Play Mode Controls attributes
Configure account attributes using Play Mode Controls to test in-game workflows before deploying to a device.
You can create and configure attributes as part of the Play Mode Controls window to test any workflows in your game that rely on platform account attributes. These attributes are customizable and you can apply them to each test user account.
You can give each attribute a unique name, and assign a type from the following list:
System.StringSystem.Int32System.Int64UnityEngine.Texture2D
When you create an attribute, placeholder content is autogenerated per user depending on the type of attribute created. The placeholder can be overridden with custom values for each user to test different scenarios.
For more information on platform account attributes, refer to Get started with attributes.
Create a Play Mode Controls attribute
To create a Play Mode Controls attribute, use the following steps:
- In the main menu, go to Window > Platform Toolkit > Play Mode Controls.
- Select the Test Account Data tab.
- In the Attributes section, use the Add (+) button to create a new attribute.
- In the Type column, select the type of attribute you want to create.
- In the Name column, give the attribute a unique name.
Each attribute appears in the Accounts section for each test user account.
Configure Play Mode Controls attributes
When creating a Play Mode Controls attribute, placeholder content is autogenerated per user depending on the type of attribute created. You can configure each test account to have unique values for each attribute if required using the following steps:
- From the Play Mode Controls window, in the Test Account Data tab, locate the test user account you wish to update.
- In the Attribute Values section, update the placeholder values with the per-user values you want to return. If the attribute is a Texture2D type, use the picker (⊙) to select a new asset.
Accessing Play Mode Controls attributes
To retrieve attribute values, use the GetAttribute method when interacting with an account.
For more information, refer to Use attributes in your project.