6#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
7using System.Runtime.InteropServices;
9namespace Interhaptics.Platforms.Sensa
12 public sealed class RazerSensaProvider : IHapticProvider
15 #region HAPTIC CHARACTERISTICS FIELDS
16 private const string DISPLAY_NAME =
"Razer Sensa Platform";
17 private const string DESCRIPTION =
"Razer Sensa Platform";
18 private const string MANUFACTURER =
"Razer Inc.";
19 private const string VERSION =
"1.0";
22 #region HAPTIC CHARACTERISTICS GETTERS
23 [UnityEngine.Scripting.Preserve]
24 public string DisplayName()
29 [UnityEngine.Scripting.Preserve]
30 public string Description()
35 [UnityEngine.Scripting.Preserve]
36 public string Manufacturer()
41 [UnityEngine.Scripting.Preserve]
42 public string Version()
49 private static class RazerSensaProviderNative
51 const string DLL_NAME =
"Interhaptics.RazerSensa";
54 public static extern bool ProviderInit();
56 public static extern bool ProviderIsPresent();
58 public static extern bool ProviderClean();
60 public static extern void ProviderRenderHaptics();
63 [UnityEngine.Scripting.Preserve]
66 bool res = RazerSensaProviderNative.ProviderInit();
68 if ((res) && (HapticManager.DebugSwitch))
70 UnityEngine.Debug.Log(
"Razer Sensa haptic provider started.");
75 [UnityEngine.Scripting.Preserve]
76 public bool IsPresent()
78 return RazerSensaProviderNative.ProviderIsPresent();
81 [UnityEngine.Scripting.Preserve]
84 return RazerSensaProviderNative.ProviderClean();
87 [UnityEngine.Scripting.Preserve]
88 public void RenderHaptics()
90 RazerSensaProviderNative.ProviderRenderHaptics();