ianphilips / unityoculusandroidvrbrowser Goto Github PK
View Code? Open in Web Editor NEW3D browser based on GeckoView and Oculus SDK for Unity projects built on Android (Oculus Go/Quest, maybe GearVR)
License: MIT License
3D browser based on GeckoView and Oculus SDK for Unity projects built on Android (Oculus Go/Quest, maybe GearVR)
License: MIT License
Hello,
fantastic and very useful work, thank you.
I just have one question, is it possible to export the plugin to a different version of Unity than the project creation version (2022.3.4f1)?
I created the apk in the original project and it works perfectly on Meta Quest 2, but I would need it on a more updated editor. I made a couple of attempts but couldn't get it to work:
I would need it for a university work project, would you be able to give me some tips on how to get your plugin working?
Thanks :)
Hey, this isn't really too related to this project, but do you have a donation link? This is exactly what I've been looking for, and I seriously want to thank you for doing the hard work for me! :)
Hello everyone,
I can load a webpage onto the Oculus Quest 2 and use it with the controller (without moving the head). Also, I can use the controller buttons to select the interactable buttons within the webpage.
However, drag & drop does not work and only clicks work (even though not always). Does d&d work to anyone and how to get it working?
I attach a video to show that clicks work while d&d does not via the controller buttons.
Thanks!
Hi, Great job!!
I cannot view Webvr html page, ex. aframe.io
Is there a way? maybe with:
import org.mozilla.geckoview.GeckoVRManager;
Hey there,
I am trying to open and build the plugin in Android Studio, however I am always getting this error which prevents me from building the project.
A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)
Any idea how to fix it?
Hello everyone,
When bulding the GeckoView plugin with the newest version ("95.0.20211129150630"), several errors occur and it is no longer possible to build the plugin.
The erros are:
Any help in solving them would be much appreciated!
P.S.: My plan ist to get the plugin running with the newest version of gecko und eventually on arm64.
I see in your readme that you are currently not working on VR. Would you be interested in a VR development position? I cannot find your contact details. Could you contact me so we can continue this conversation?
Best regards,
Juan
I want to run the OverlayBrowserDemo on Oculus Quest 2.
But the app crashes after the Unity logo is displayed.
UnityProject
in UnityBuild Settings
> Platform
to Android
Build Settings
> Texture Compression
to ASTC
Switch Platform
Player Settings
> Player
> Other Settings
> Auto Graphics API
Project Settings
> XR Plug-in Management
> Plug-in Providers
> Oculus
Scenes/OverlayBrowserDemo
to Build Settings
> Scenes In Build
Android Logcat
in Package Manager
(To see Quest's log)The app launches in the Quest and I'll be able to see the browser.
The app crashes and exits after the Unity logo is displayed.
Logcat shows the error log: log.txt
OverlayBrowserView
will launch the app without crashingOS: Windows 10
HMD: Oculus Quest 2
Unity: 2019.4.14f1
I've been able to build the GackoViewPlugin. Now I'm trying to figure out how I can modify it to make it open clicked <a href=""/>
links which has target="_blank"
attribute e.g "open in new tab" at least in the current "browser" session tab.
N.B:
I have a side question about GeckoViewPlugin build. In the "Problems" view, Android Studio reports Cannot resolve symbol 'unity3d'
on import com.unity3d.player.UnityPlayer;
and Cannot resolve symbol 'UnityPlayer'
everywhere it's used. However it builds successfuly. How is that posbile?
I was just wondering if there are any more specific instructions that can be given on bringing the browser (and all necessary code/plugins) into another unity project. I've replicated the Underlay browser scene perfectly in another project but the application consistently crashes after a few frames after launching.
Hi, I'm a beginner at unity.
I imported UnityOculusAndroidVRBrowser and fixed the conflict with my default oculus plugin.
But when I build it, stoped with 'ArgumentException: The Assembly UnityEditor is referenced by UniRx.Async'.
Detail is here,
ArgumentException: The Assembly UnityEditor is referenced by UniRx.Async ('Assets/UnityOculusAndroidVRBrowser-master/UnityProject/obj/Debug/UniRx.Async.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary
2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:154)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:194)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)
Please tell me how to fix this.
Thank you.
Hi, thank you for the great plugin!
I would like to implement multiple windows using this plugin. Do you have any tips on how to implement it?
I think it is possible to run multiple sessions by duplicating OVRSurfaceGeckoView
. But I don't know how to render it in OVROverlay
...
Hi! I'm trying to use this asset.
Can I execute javascript on a browser?
I need to execute a UserScript to customize a website
When building via the rebuild option i get
Execution failed for task ':app:externalNativeBuildCleanDebug'.
> A problem occurred starting process 'command '/Users/ianphilips/Library/Android/sdk/cmake/3.6.4111459/bin/cmake''
so to build the .aar
file i use gradlew assemble
after building it and renaming the 'app-release.aar' to the old name (is the necessary?) I get the following error;
Note: C:\Unity Projects\UnityOculusAndroidVRBrowser\UnityProject\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.eyeflite.ian.geckoviewplugin.BuildConfig found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.BytesBuffer found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$1 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$10 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$11 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$12 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$13 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$14 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$15 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$16 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$17 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$18 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$2 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$3 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$4 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$5 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$6 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$7 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$8 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$9 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.GeckoViewPLugin$SessionTypes found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView$1 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView$2 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView$3 found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.OVRSurfaceGeckoView$Display found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Duplicate class com.eyeflite.ian.geckoviewplugin.UnityInterface found in modules classes.jar (:app-debug:) and classes.jar (:geckoview-armeabi-v7a-80.0.20200818235255:)
Go to the documentation to learn how to Fix dependency resolution errors.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.GUIUtility:ProcessEvent (int,intptr)
The webview is rendered by OVROverlay, and it will always render in front of everything else (overlay is in front of eye texture)
So when converted the scene to use controllers input instead of gaze, the controller is always looks behind the webview, and looks wired.
And because this is based on oculus sdk, it is hard to use in other mobile vr platforms such as daydream and pico.
Maybe there is a way to get rid of oculus sdk?
Hi.
How to connect canvas ui keyboard to webpage inside browser.
for example keyboard for google search field.
Currently I am developing the VR keyboard. I am able to input Lowercase, numbers and some Symbol(e.g. !?.-+ etc.) from this keycode list here(https://android.googlesource.com/platform/frameworks/native/+/master/include/android/keycodes.h).
public void RButtonInput()
{
int javaCode = 46; // 46 is keycode for 'r'
CallAjc("AddKeyCode", new object[] { javaCode });
//this is 'r' char letter.
}
However how do i implement an uppercase letter of R?
And what is the keycode for other alphabet like ö ä ü ß ..?
Thank you for your help.
Can I use it without the oculus sdk? I'm planning to use it on android not oculus, and I'll really love to use it, maybe even showing the result if you want.
Nice work!
the plugin scrolls to the top of the page when a webpage is loaded, that code should be taken out and given to unity to control.
Hi2.
Small question, Does the BrowserView has to be rendered on top of everything?
I have a keyboard that use a canvas renderer and as well as some other game object with default unity material.
And the BrowserView gameobject is always render in top of the canvas as well as every other game object.
I am sorry for bothering you, but finally I found most suitable plugin for my project. I have tried yours but still getting problem. Can you make a simple sample scene that only show this web browser in a plane without oculus integration, I mean by using the camera instead. I will be really grateful if you could help me...I have been struggling with my diploma final project.
:( :(
Great job overall!
Keep continue like that!
I've got this error maybe you can help.
Assets/BrowserView.cs(102,44): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 6.0 language specification
Thanks!
Sorry if this is a dumb question, but I'm a complete noob with unity. Is it possible to change the resolution of the browser view and the web page rendered? In the demo project I've tried changing the height/width of the browserview component to 2560x1440, as well as the height and width of the ovr overlay external surface, but the webpage still renders as if the resolution is extremely small. Thanks
I'm getting this error "No listener for GeckoView:ContentPermission" whenever I click in the page, then the app crashes
Something about the new Gmail look doesn't allow WebView.enableSlowWholeDocumentDraw();
to work properly and users can only see initial screen dimensions worth of the UI. A user has to click on the compose icon and then scroll down to the bottom of that to choose the original look for Gmail to load properly. May have to file a bug or investigate scrolling with via Javascript.
Just to let one knows that there are breaking changes starting from version 105.0.20220912145803 of geckoview which prevent GeckoViewPlugn to compile:
> Task :app:compileDebugJavaWithJavac FAILED
G:\VIZUA\github\vizua3d\UnityOculusAndroidVRBrowser\GeckoViewPlugin\app\src\main\java\com\eyeflite\ian\geckoviewplugin\GeckoViewPLugin.java:728: error: method does not override or implement a method from a supertype
@Override
^
G:\VIZUA\github\vizua3d\UnityOculusAndroidVRBrowser\GeckoViewPlugin\app\src\main\java\com\eyeflite\ian\geckoviewplugin\OVRSurfaceGeckoView.java:67: error: method surfaceChanged in class GeckoDisplay cannot be applied to given types;
mDisplay.surfaceChanged(mSurface, mWidth, mHeight);
^
required: SurfaceInfo
found: Surface,int,int
reason: actual and formal argument lists differ in length
G:\VIZUA\github\vizua3d\UnityOculusAndroidVRBrowser\GeckoViewPlugin\app\src\main\java\com\eyeflite\ian\geckoviewplugin\OVRSurfaceGeckoView.java:117: error: method surfaceChanged in class GeckoDisplay cannot be applied to given types;
mDisplay.surfaceChanged(mSurface, width, height);
^
required: SurfaceInfo
found: Surface,int,int
reason: actual and formal argument lists differ in length
G:\VIZUA\github\vizua3d\UnityOculusAndroidVRBrowser\GeckoViewPlugin\app\src\main\java\com\eyeflite\ian\geckoviewplugin\OVRSurfaceGeckoView.java:136: error: method surfaceChanged in class GeckoDisplay cannot be applied to given types;
mDisplay.surfaceChanged(holder.getSurface(), width, height);
Some builds will show distortion at the edges of browser - I have no idea why. My current solution is to import a rectangular texture asset that has a hole cut out in the middle in the shape of your browser, render it into an OVROverlay
, and position it to cover a couple virtual inches of space around the browser to hide the distortion. LMK if this is unclear, and I should just upload the asset I'm using.
I would like to display my IoT monitoring (web-based) kind of attach to an gameobject, is it possible?
did anyone try to run this on oculus quest?
I am having trouble running this on Oculus Quest, the main problem with it is that logcat shows no errors whenever the app crashes.
Also I noticed that portion of the log complaining about BasicActivity, which did not make much sense to me,due to me being fairly new to android system.
`04-02 23:25:56.530 10637 10654 I AndroidUnity: Hi, new instance created
04-02 23:25:56.530 10637 10654 I AndroidUnity: CREATING FRAGMENT
04-02 23:25:56.531 10637 10637 D AndroidUnity: On Create View!
04-02 23:25:56.531 10637 10637 D AndroidUnity: On inflate View!
04-02 23:25:56.537 10637 10637 I AndroidUnity: BasicActivity not found! We are a library and not an application
04-02 23:25:56.538 10637 10637 I AndroidUnity: activity is not null, setting basic selection delegate and using floating bar: true
04-02 23:25:56.538 10637 10637 I AndroidUnity: CREATING runtime
04-02 23:25:56.552 10637 10654 D AndroidUnity: My unity callback is set
04-02 23:25:56.569 10637 10637 I AndroidUnity: CREATING sessions hashmap`
How could I only use webview and clear XR setting in this project?
Just want to say, first off, this browser plugin is incredible. It's really cool that you were able to create this.
I had a question about how the browser appears to visited websites. If I'm not mistaken, the browser is recognized by sites like Google and Youtube as a mobile platform. I'm currently working on implementing this browser in a project and was wondering if there was some way to designate in the plugin that the browser should force itself to be labeled as a desktop platform.
Thank you in advance, I hope this isn't a terribly difficult question.
Hey first of all Thanks for the Plugin!
I had one doubt i.e is there a way to call javascript function from unity or call unity function from javascript or send data accordingly?
Hey! I have downloaded the latest source code and even the beta builds, and no matter what I try, nothing appears on the Quad. The website never shows up on the Quad. Any way to get this to work?
Some sites will only give you the mobile version, but there are times when you really just need the desktop version (Microsoft Teams and Jit.si from my tests). Any way to do that?
I found out adding this file https://drive.google.com/file/d/1Ktx5nUFq3W1myDY2x55AHQdFNWSxabN8/view?usp=sharing
(Not a virus, github didn't let me upload it)
in unity's android plugin folder, the app does not crash. But don't know if other things do work.
Also, I'll like to know which is the status of the project?
Thanks a lot!
Bruno
Hi,
I'd like to say that this is a great idea and it's something that I've been needing for a project that I'm currently working on,
but however, I've been running the demo scenes and for some reason, it's not showing any content it the BrowserView window?
I'm a beginner, and not very experienced with programming or Unity, it may just be because I'm new to all this and I'm making a simple error.
Could you be able to help me out?
Thanks.
hello. i am trying to download this from github then build for Oculus Quest, but browser is not working. can you send me pls another unity project where this is working?
Whenever I set the target architecture to arm7 every works as expected. But if I try to build for arm64 the web browser crashes the app upon loading. Is there something that requires it to be build for arm7 or just a setting somewhere that I am missing that would allow it to be built for arm64
Change the build.gradle settings to pull the latest geckoview version (now 81.x ).
Make sure the API hasn't introduced breaking changes, and move the compiled plugin to the plugins folder.
Test on the headset
Hi,
I was wondering if it's possible to receive a message from web content to Unity project with the plugin.
Hi,
Great job on the project! I'm using it to play videos in VR and it works very well. One issue that I'm running into is restarting the View after hiding/showing the browser window. I tried uncommenting the RestartSession method, but, as the TODO comment states, the texture is not being updated after restart. Do you know what could be causing that or any ways to get around it?
Thanks!
I am confused by this problem.... what is wrong ??? help me
Assets/SimpleRacer/Script/Wheel.cs(27,34): error cs1644: Feature 'declaration expression' cannot be used because it is not part of the c# 4.0 languange
void Update ()
{
wheelCollider.GetWorldPose(out Vector3 pos, out Quaternion rot); // this error code
wheelTransform.position = pos;
wheelTransform.rotation = rot;
}
Hello,
Thanks for providing this great browser.
We're using it to show a website within an Oculus app, and this site has some pop up windows. These pop up windows do not show up in the browser, and so the user is unable to interact with them.
If this is something we should be able to do, but we're not doing it right, please could you let me know how to do it?
Otherwise, is this something we could request?
Thanks,
Ed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.