Class ItemView
Component that manages displaying an icon and text.
Inherited Members
Namespace: UnityEngine.GameFoundation.Components
Syntax
public class ItemView : MonoBehaviour
Properties
descriptionTextField
The TextMeshProUGUI component to show the description.
Declaration
public TextMeshProUGUI descriptionTextField { get; }
Property Value
Type | Description |
---|---|
TMPro.TextMeshProUGUI |
displayNameTextField
The TextMeshProUGUI component to show the display name.
Declaration
public TextMeshProUGUI displayNameTextField { get; }
Property Value
Type | Description |
---|---|
TMPro.TextMeshProUGUI |
imageField
The Image component to show an icon.
Declaration
public Image imageField { get; }
Property Value
Type | Description |
---|---|
Image |
Methods
SetDescription(String)
Set the description that is displayed in this view.
Declaration
public void SetDescription(string description)
Parameters
Type | Name | Description |
---|---|---|
String | description | Text to display. |
SetDisplayName(String)
Set the display name that is displayed in this view.
Declaration
public void SetDisplayName(string displayName)
Parameters
Type | Name | Description |
---|---|---|
String | displayName | Text to display. |
SetIcon(Sprite)
Sets icon that is displayed in this view.
Declaration
public void SetIcon(Sprite icon)
Parameters
Type | Name | Description |
---|---|---|
Sprite | icon | Icon sprite to display. |
SetItemView(Sprite, String, String)
Sets icon and text that are displayed in this view.
Declaration
public void SetItemView(Sprite icon, string displayName, string description)
Parameters
Type | Name | Description |
---|---|---|
Sprite | icon | Icon sprite to display |
String | displayName | Name to display |
String | description | Description to display. |