This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Getting Started (Unity Oculus Quest)
Sangwon Choi edited this page May 19, 2023
·
7 revisions
- Prerequisite: Oculus Integration Plugin(https://assetstore.unity.com/packages/tools/integration/oculus-integration-82022)
- Pair your TactSuit to your headset in the Oculus Quest settings.
(Settings > Experimental Features > Bluetooth Pairing)
- Or download bHaptics Player for Oculus Quest.
(https://assetstore.unity.com/packages/tools/integration/bhaptics-haptic-plugin-76647)
- If you don't have one, make a new file to the path
Assets/Plugins/Android/AndroidManifest.xml
.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:versionCode="1"
android:versionName="1.0" >
<queries>
<package android:name="com.bhaptics.player" />
</queries>
<application
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true" >
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:screenOrientation="sensorPortrait" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" />
</application>
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
</manifest>
- Or, just add the following into your AndroidManifest.xml
<manifest>
<queries>
<package android:name="com.bhaptics.player" />
</queries>
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
</manifest>
- Change the build setting to Android to enable the bHaptics Widget.
- Add the [bHaptics] prefab to your scene.
[bHaptics] is located at 'Assets/Bhaptics/SDK/Prefabs' folder.
- For more detail, please refer this link
- Add the [bHapticsAndroidUI] prefab to your scene.
[bHapticsAndroidUI] is located in Assets/Bhaptics/SDK/Prefabs/Android
2.3. If you don't have one, add the UI/EventSystem to your scene in order to trigger events with [bHapticsAndroidUI].
2.4. For more detail on interacting with [bHapticsAndroidUI], you can check the example package(BhapticsOculusExample).
the example package is located in Assets/Bhaptics/SDK/Examples/ExamplePackages