EVERYTHING
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR;
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class IsVRBehavior : NodeBehavior
|
||||
{
|
||||
public override void OnGraphUpdate()
|
||||
{
|
||||
bool value = InputDevices.GetDeviceAtXRNode(XRNode.Head).isValid || InputDevices.GetDeviceAtXRNode(XRNode.LeftHand).isValid || InputDevices.GetDeviceAtXRNode(XRNode.RightHand).isValid;
|
||||
SetLocalOutputValueIfChanged("VR", BSValue.FromBool(value));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user