Search Unity

Can I embed HTML5 build in another page?

Discussion in 'General Discussion' started by Sesshomurai, Jan 4, 2021.

  1. Sesshomurai

    Sesshomurai

    Joined:
    Jun 14, 2020
    Posts:
    19
    Hi,
    I know Unity has HTML5 support, but how does that work exactly? Can I generate a node package of my game? Or host it via a link?

    What I want to do is embed the Unity HTML5 version of my game in a web page of another app. Is that possible?

    thanks!
     
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Its basically a "maybe" to all of that? Unity has WebGL support right now if that is what you mean. You can put it on whatever webpage you want and then if the target device + browser can run it, it will work. If that means you are opening a webpage in another app, then yes it will work as long as the above is met.

    You probably want to use unity as a library if you want it in another app, not as a "web page".

    https://unity.com/features/unity-as-a-library

    Generally speaking WebGL is not supported on mobile devices at all (Although you can get it to run with caveats). Additionally some browsers (safari) wont support higher than WebGL 1.0 which basically makes things look and run like they were created a long time ago. You wont have access to threading at all, you will have a massive restriction on amount of available memory, you wont have access to shader features that go above OpenGL ES 2.0. Its not the best thing to target to be honest, and I say this as someone who works exclusively with WebGL for my day job projects.
     
    adamgolden likes this.
  3. Sesshomurai

    Sesshomurai

    Joined:
    Jun 14, 2020
    Posts:
    19
    Ok. Thanks for the info. I will experiment some more and see if I can do what I need. My scenes don't need to be complex since they will probably be retro 8-bit graphics type of games.