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 |
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()
OnGameFoundationException(Exception)
If GameFoundation throws exception, log the error to console.
Declaration
public void OnGameFoundationException(Exception exception)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception thrown by GameFoundation. |
OnGameFoundationInitialized()
Once Game Foundation completes initialization, we enable buttons, setup callbacks, update GUI, etc.
Declaration
public void OnGameFoundationInitialized()
VegetableTag()
Set the current tag to be 'vegetable.'
Declaration
public void VegetableTag()