using System.Collections; using System.Collections.Generic; using UnityEngine; using Valve.VR; public class ViveInput : MonoBehaviour { public PlayerReplay playerReplay; private SteamVR_Action_Boolean grabPinch; private SteamVR_Action_Boolean grabGrib; //private void Awake() //{ // actionBoolean = SteamVR_Actions._default.GrabPinch; //} //// Start is called before the first frame update //void Start() //{ // actionSet.Activate(SteamVR_Input_Sources.Any, 0, true); //} private void Start() { grabPinch = SteamVR_Actions.default_GrabPinch; grabGrib = SteamVR_Actions.default_GrabGrip; } // Update is called once per frame void Update() { if (grabPinch.GetStateDown(SteamVR_Input_Sources.Any)) { playerReplay.Save(); } if (grabGrib.GetStateDown(SteamVR_Input_Sources.Any)) { playerReplay.Load(); } } }