Skip to content

Sample unity project for manipulating WebView from Mixed Reality Toolkit. Confirmed to work on Oculus.

License

Notifications You must be signed in to change notification settings

TLabAltoh/TLabWebViewMRTK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TLabWebViewMRTK

Sample project for manipulating TLabWebView from Mixed Reality Toolkit

Document

document is here

ScreenShot

Operating Environment

  • Oculus Quest 2
  • Qualcomm Adreno650

Note

please see here

This Repository only for Oculus Quest 2

This is a project I created for Oculus Quest 2, using the MRTK, but it does not work with HoloLens. This is because the WebView used is an Oculus (or Android) dependent system.

Requirements

Get Started

Installing

Clone the repository with the following command

git clone https://github.com/TLabAltoh/TLabWebViewMRTK.git

cd TLabWebViewMRTK

git submodule update --init

Set Up

  • Build Settings
Property Value
Platform Android
  • Project Settings
Property Value
Color Space Linear
Minimum API Level 29
Target API Level 31
  • Add the following symbols to Project Settings --> Player --> Other Settings (to be used at build time)
UNITYWEBVIEW_ANDROID_USES_CLEARTEXT_TRAFFIC
UNITYWEBVIEW_ANDROID_ENABLE_CAMERA
UNITYWEBVIEW_ANDROID_ENABLE_MICROPHONE
  • Create Assets/Plugins/Android/AndroidManifest.xml and copy the following text
manifest example
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
  <application android:label="@string/app_name" android:icon="@mipmap/app_icon" android:allowBackup="false">
    <activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:launchMode="singleTask" android:name="com.unity3d.player.UnityPlayerActivity" android:excludeFromRecents="true">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
    <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
    <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only" />
  </application>
	
    <!-- For Unity-WebView -->
    <application android:allowBackup="true"/>
    <application android:supportsRtl="true"/>
    <application android:hardwareAccelerated="true"/>
    <application android:usesCleartextTraffic="true"/>

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.MICROPHONE" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.microphone" />
    <!-- For Unity-WebView -->
	
  <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
</manifest>

Sample Scene

Assets\TLab\TLabWebViewMRTK\Scene\TLabWebView MRTK Sample.unity

Link

About

Sample unity project for manipulating WebView from Mixed Reality Toolkit. Confirmed to work on Oculus.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages