This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .gitignore for Unity by Cory Corvus | |
# Ignore everything | |
/* | |
/*/ | |
# Keep assets & project settings | |
!/Assets/ | |
!/ProjectSettings/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UDP; | |
public class TestUDP : MonoBehaviour | |
{ | |
void Start() | |
{ | |
InitListener initListener = new InitListener(); | |
LicenseCheckListener licenseCheckListener = new LicenseCheckListener(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using Viveport; | |
// Viveport DRM Documentation: | |
// https://developer.vive.com/resources/documentation/viveport-sdk/apis/drm-api/ | |
// NOTE: To use Unity functions such as Application.Quit within callback functions requires running on the main thread. | |
// Please attach 'MainThreadDispatcher.cs' to an object in your scene | |
// https://developer.vive.com/resources/documentation/viveport-sdk/integration-with-viveport-sdk/for-unity-developers/using-the-unity-main-thread-dispatcher-script/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void EyeCalibration() | |
{ | |
Debug.Log("Start Calibration"); | |
int result = ViveSR.anipal.Eye.SRanipal_Eye_API.LaunchEyeCalibration(System.IntPtr.Zero); // Ptr not implemented so using Zero | |
Debug.Log("Finish Calibration: " + result); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.XR; | |
using Valve.VR; | |
// simple library and examples for XR haptics | |
// note: controllers must be tracking to use haptics | |
// other examples: https://vrtoolkit.readme.io/docs/vrtk_interacthaptics | |
public static class HapticPulse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Diagnostics.Process process = new System.Diagnostics.Process(); | |
process.StartInfo.FileName = "C:\\Program Files (x86)\\Steam\\steamapps\\common\\SteamVR\\tools\\lighthouse\\bin\\win64\\lighthouse_console.exe"; | |
process.StartInfo.Arguments = "/serial 81F6B76702 poweroff"; | |
process.StartInfo.UseShellExecute = true; | |
process.StartInfo.CreateNoWindow = true; | |
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; | |
process.Start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char serialNumber[1024]; | |
vr::VRSystem()->GetStringTrackedDeviceProperty(deviceID, vr::Prop_SerialNumber_String, serialNumber, sizeof(serialNumber)); | |
printf("Serial Number = %s \n", serialNumber); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.XR; | |
using Valve.VR; | |
/// <summary> | |
/// These are a few different ways to detect the current VR HMD and controller type. | |
/// - Unity XR api | |
/// - Unity Input api | |
/// - SteamVR plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using Viveport; | |
public class QuitGoHome | |
{ | |
const int SUCCESS = 0; | |
private static bool isSubscriber = false; | |
static void Quit() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
using Oculus.Platform; | |
#if UNITY_4 || UNITY_5 | |
using UnityEngine.Events; | |
#endif | |
/* | |
Step 1: Download & Install Oculus Platform SDK | |
Step 2: Update your App ID in the Editor |
NewerOlder