Load Unity3D file in Xamarin WebView

472 Views Asked by At

I'm trying to integrate Unity3D game into Xamarin using Xamarin Forms WebView Control.

I have an output from unity (unity web player file) .html + .unity3d files.

I placed files in android 'assets/unity/' directory.

Created webview control in xamarin forms and named it as browser.

Loading html file from 'assets/unity' directory.

Look below for my code

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();
        browser.Source = "file:///android_asset/Unity/Sample_Web.html";

    }
}

Output is displayed as : enter image description here

Output is not as expected. I assume it is missing unity web player plugin. Can anyone suggest how to load unity web player file in xamarin forms webview ?

Thanks in advance.

1

There are 1 best solutions below

0
Jefferson Reis On

Your browser does not support web player. To be sure, try opening some other web player game.

An alternative is to use Three.js