Class TagsSample
This class manages the scene and serves as an example for inventory basics.
Inherited Members
Namespace: UnityEngine.GameFoundation.Sample
Syntax
public class TagsSample : MonoBehaviour
Fields
buttons
Reference to the buttons
Declaration
public Button[] buttons
Field Value
Type | Description |
---|---|
Button[] |
mainText
We will need a reference to the main text box in the scene so we can easily modify it.
Declaration
public Text mainText
Field Value
Type | Description |
---|---|
Text |
wrongDatabasePanel
Reference to the panel to display when the wrong database is in use.
Declaration
public GameObject wrongDatabasePanel
Field Value
Type | Description |
---|---|
GameObject |
Methods
FoodTag()
Set the current tag to be 'food.'
Declaration
public void FoodTag()
FruitTag()
Set the current tag to be 'fruit.'
Declaration
public void FruitTag()
NoTagFilter()
Sets the current tag to empty string for no filtering.
Declaration
public void NoTagFilter()
VegetableTag()
Set the current tag to be 'vegetable.'
Declaration
public void VegetableTag()