Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
726 B

namespace VRTK.Examples
{
using UnityEngine;
using UnityEngine.UI;
public class UI_Keyboard : MonoBehaviour
{
private InputField input;
public void ClickKey(string character)
{
input.text += character;
}
public void Backspace()
{
if (input.text.Length > 0)
{
input.text = input.text.Substring(0, input.text.Length - 1);
}
}
public void Enter()
{
VRTK_Logger.Info("You've typed [" + input.text + "]");
input.text = "";
}
private void Start()
{
input = GetComponentInChildren<InputField>();
}
}
}