Class ImageInfoView
Component that manages displaying an icon and text.
Inherited Members
Namespace: UnityEngine.GameFoundation.Components
Syntax
public class ImageInfoView : MonoBehaviour
Properties
imageField
The Image component to show an icon.
Declaration
public Image imageField { get; }
Property Value
Type | Description |
---|---|
Image |
textField
The TextMeshProUGUI component to show a text.
Declaration
public TextMeshProUGUI textField { get; }
Property Value
Type | Description |
---|---|
TMPro.TextMeshProUGUI |
Methods
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 |
SetText(String)
Set text that is displayed in this view.
Declaration
public void SetText(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text | Text to display |
SetView(String, Property)
Sets icon and text that are displayed in this view.
Declaration
public void SetView(string text, Property imageProperty)
Parameters
Type | Name | Description |
---|---|---|
String | text | Text to display |
Property | imageProperty | Property to get sprite image from |
SetView(Sprite, String)
Sets icon and text that are displayed in this view.
Declaration
public void SetView(Sprite icon, string text)
Parameters
Type | Name | Description |
---|---|---|
Sprite | icon | Icon sprite to display |
String | text | Text to display |