-
Notifications
You must be signed in to change notification settings - Fork 0
File Browser
Gaurang Ruparelia edited this page Dec 10, 2023
·
3 revisions
File Browser: https://github.com/yasirkula/UnitySimpleFileBrowser https://github.com/yasirkula/UnitySimpleFileBrowser/issues/87 https://github.com/yasirkula/UnitySimpleFileBrowser/issues/89
This has mainly been done based on the guidance here: https://discussions.unity.com/t/vr-oculus-quest-2-unity-file-browser-to-select-and-load-an-image/257860/5#:~:text=But%20also%20you,VR%20and%20XR.
- I have added permissions in the Awake method as advised on the FAQ
- I have modified the SimpleFileBrowserCanvas asset to better suit VR by changing the Render mode to World Space
- Adjusted the Scale of the prefab to suit the VR environment (e.g., set x, y, and z to 0.0048 or to a scale that fits your VR setup).
- Added XRI Input module after enabling the Event System
- Added TrackedDeviceGraphicRaycaster to the Event System
- Placed the asset in my main scene and hid it initially
- Added TrackedDeviceGraphicRaycaster to the Files Canvas nested deep inside, and to SimpleFileBrowserCanvas prefab and the event system
- Remove the Camera nested in SimpleFileBrowserCanvas
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.GaurangR.Alexandria">
<!-- Replace the existing WRITE_EXTERNAL_STORAGE permission declaration -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="replace" />
<!-- Include the following only if you target Android 10 (API level 29) or higher -->
<!-- Scoped Storage enforcement bypassed for Android 11 and higher -->
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" />
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector">
<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>
<activity android:name="com.unity3d.player.UnityPlayerGameActivity"
android:theme="@style/BaseUnityGameActivityTheme">
<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" />
<meta-data android:name="android.app.lib_name" android:value="game" />
</activity>
</application>
</manifest>