Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can i use it with google cardboard and also with pointer controller? #612

Open
bdmg06114 opened this issue Nov 8, 2020 · 13 comments
Open

Comments

@bdmg06114
Copy link

Hi, I'm a middle school student and I wanna use this for a VR cinema project. but due to my budget i gotta make it with google cardboard so there's a few questions.

  1. Can I use it as texture? so that i can project it to mesh. cause i want it to be customizable screen.
  2. will it affect performance? cause i don't think i have a great phone.
  3. How can i interect with webview object like raycast?
    hope you reply soon:) and Thank you for let us use this amazing code free
@KojiNakamaru
Copy link
Member

This plugin places a native WebView over the unity's rendering view and doesn't allow to place the webview in 3D space, so it is not adequate for VR. Related discussions can be found in several issues. The following comments include some useful links (but they might not be directly utilized).

#81 (comment)
#81 (comment)

You can also find assets on Asset Store (although they might be a bit expensive), for example,

https://assetstore.unity.com/packages/tools/gui/3d-webview-for-android-web-browser-137030
https://assetstore.unity.com/packages/tools/gui/3d-webview-for-android-and-ios-web-browser-135383

@DineshGro
Copy link

How do add this in WebGl project?

@KojiNakamaru
Copy link
Member

How do add this in WebGl project?

WebGL is not directly related to this issue. What are you talking about?

@HafizMSaad
Copy link

@KojiNakamaru
so it is not adequate for VR
I have a query regarding the above context: What if I need to run it on a 2D app running on a VR headset?
And would it be fullscreen, I mean immersive?

@KojiNakamaru
Copy link
Member

@HafizMSaad
I've not tried to test this plugin for VR headsets, and I guess it heavily depends on each VR headset. For example, a VR headset based on an ordinal smartphone utilizes the smartphone's single screen to display two images for left/right eyes. This plugin however shows a single WebView on the screen so it won't appear correctly for left/right eyes. In order to support various VR headsets correctly, rendering webviews in 3D seems to be required even if you render only 2D games.

@HafizMSaad
Copy link

@KojiNakamaru
Thank you for the prompt response, it's greatly appreciated.
Just one more question: Is it possible to inject JavaScript into it while running on Android?

@KojiNakamaru
Copy link
Member

@HafizMSaad
Yes, you can utilize EvaluateJS(), for example:

    webViewObject.EvaluateJS("document.body.style.backgroundColor = 'red'");

@HafizMSaad
Copy link

For those seeking VR-compatible solutions, I recommend checking out the following repository: https://github.com/TLabAltoh/TLabWebViewVR

@Rajdeep-git776
Copy link

How can i add the webview in a 3D space. Any solution for this? i dont want to buy any paid plugins

@Rajdeep-git776
Copy link

@HafizMSaad can i use this for Android devices?

@HafizMSaad
Copy link

@HafizMSaad can i use this for Android devices?

@Rajdeep-git776 I used it for my HMD(Android-Based), and it worked!

@Rajdeep-git776
Copy link

i am using the TLabWebView but when i build it to my device the url provided is not loading can anyone help @HafizMSaad
Screenshot 2024-09-23 at 11 44 27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants