SpeedLinearEditor.cs 544 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using Valve.VR.InteractionSystem;
  6. public class SpeedLinearEditor : MonoBehaviour
  7. {
  8. public float speed;
  9. public Text speedText;
  10. public LinearMapping linearMapping;
  11. // Start is called before the first frame update
  12. void Start()
  13. {
  14. }
  15. // Update is called once per frame
  16. void Update()
  17. {
  18. speed = linearMapping.value;
  19. speedText.text = (linearMapping.value).ToString();
  20. }
  21. }