Class RewardItemView
Component that manages displaying an individual Reward Item.
Inherited Members
Namespace: UnityEngine.GameFoundation.Components
Syntax
[AddComponentMenu("Game Foundation/Reward Item View", 7)]
[ExecuteInEditMode]
public class RewardItemView : ItemView
Properties
payoutCountPrefix
The string to prefix the payout counts with when generating display.
Declaration
public string payoutCountPrefix { get; }
Property Value
Type | Description |
---|---|
String |
payoutItemIconSpritePropertyKey
The Static Property key string that should be used for getting the image of each item in the Payout of a Reward Item for displaying. The key must exist on each inventory item or currency added as a payout; any that don't have the key won't have their images displayed.
Declaration
public string payoutItemIconSpritePropertyKey { get; }
Property Value
Type | Description |
---|---|
String |
rewardDefinitionKey
The definition key of the Reward that the Reward Item being displayed belongs to.
Declaration
public string rewardDefinitionKey { get; }
Property Value
Type | Description |
---|---|
String |
rewardItemDefinition
A reference to the Reward Item Definition.
Declaration
public RewardItemDefinition rewardItemDefinition { get; }
Property Value
Type | Description |
---|---|
RewardItemDefinition |
rewardItemDefinitionKey
The definition key of the Reward Item being displayed.
Declaration
public string rewardItemDefinitionKey { get; }
Property Value
Type | Description |
---|---|
String |
Methods
SetPayoutCountPrefix(String)
Sets the string to prefix the payout counts with when generating display.
Declaration
public void SetPayoutCountPrefix(string prefix)
Parameters
Type | Name | Description |
---|---|---|
String | prefix | The string to prefix. |
SetPayoutItemIconSpritePropertyKey(String)
Sets the key to use when getting the images of the Inventory and Currency items that are paid out in this RewardItem. Each item should have this key in its Static Properties.
Declaration
public void SetPayoutItemIconSpritePropertyKey(string propertyKey)
Parameters
Type | Name | Description |
---|---|---|
String | propertyKey | The Static Property key to look up image by. Any Inventory or Currency Items that don't have this key in their Static Properties will not display an image. If the key is null, no change from the current key will be made. |
SetRewardItemDefinition(RewardItemDefinition)
Sets the key of the Reward displayed in this Reward Item
Declaration
public void SetRewardItemDefinition(RewardItemDefinition definition)
Parameters
Type | Name | Description |
---|---|---|
RewardItemDefinition | definition | A reference to a Reward Item definition. |
SetTitleDisplayFormat(String)
Sets the format string to use when generating title. Only used when being instantiated by RewardPopupView.
Declaration
public void SetTitleDisplayFormat(string format)
Parameters
Type | Name | Description |
---|---|---|
String | format | The format string to use when generating title. Suggested format would be something like "Day {0}" where {0} will be replaced with the count + 1 of the item in the Reward's list. |