Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
InputFieldUpdater.cs
Go to the documentation of this file.
2 using UnityEngine;
3 using UnityEngine.UI;
4 
5 namespace droid.Runtime.Utilities.GameObjects.StatusDisplayer.EventRecipients {
9  [RequireComponent(typeof(InputField))]
10  [ExecuteInEditMode]
11  public class InputFieldUpdater : DataPoller {
14  [SerializeField]
15  InputField _input_field;
16 
19  void Start() { this._input_field = this.GetComponent<InputField>(); }
20 
25  public override void PollData(dynamic data) {
26  if (data is string) {
27  if (this._input_field) {
28  this._input_field.text = data;
29  }
30  }
31  }
32  }
33 }