- Home /
Show HTML5 page on Android
I need to display a HTML5 web page on Android through Unity3D. I realize it is tricky to render it into a texture on mobile at this stage, but how about using a plugin to display it in a window on top of Unity 3D?
Basically what I want to achieve is to have the Unity3D game launch an HTML5 webpage on Android, and later close it and return to Unity3D. I suppose it is possible when using a plugin, but I am not sure how to do that.
Answer by ActionAbbas · Feb 15, 2015 at 06:22 PM
Hi batmobile,
From my experiences you can just have a button which opens that link (see code) and if the user taps the back key on Android it returns to the unity app.
if (GUILayout.Button("More Games"))
{
Application.OpenURL("http://www.actionabbas.com");
}
Hope this helps
Cheers Abbas
Thank you, this is useful info. However, a couple of problems: It would take the user to the browser, and I need a full screen solution so that it appears as if the HT$$anonymous$$L5 page is still running within the app. Also, in my case I need the launching app to control when to leave the HT$$anonymous$$L5 page, I cannot rely on a back button being pressed manually.
I am thinking of some native code plugin that launches a window over Unity 3D window, with a native HT$$anonymous$$L5 renderer. But I do not know how to approach it.
I'm not sure if there is any plugin for this, I think you may need to create your own one.
Yes, I will make my own plugin. Although, I am hoping to get some help here how to start and wether it is feasible at all.
I can't help you there. I've no experience with creating plugins but I think this may help to start with http://forum.unity3d.com/threads/unity-plugin-development.124139/
Your answer
