HUGE CHANGES !!!!Add Assembly definitions for code!!!!
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "Controller",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf7bd9a36ac2a084fa8157f5e52857ee
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR;
|
||||
public class Controller : MonoBehaviour
|
||||
{
|
||||
public XRNode Hand;
|
||||
InputDevice device;
|
||||
public float duration;
|
||||
public float amplitude;
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
device = InputDevices.GetDeviceAtXRNode(Hand);
|
||||
device.SendHapticImpulse(0, amplitude, duration);
|
||||
}
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
device = InputDevices.GetDeviceAtXRNode(Hand);
|
||||
device.StopHaptics();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b827d6b92c85ea44b8376851b155786b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user