Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to embed HTML5 build online?

Discussion in 'General Discussion' started by AndrewRyan, Mar 25, 2015.

  1. AndrewRyan

    AndrewRyan

    Joined:
    Apr 7, 2014
    Posts:
    19
    Hello,

    I made a couple games in unity. I want to put them in playable format on my portofolio site- a wordpress site- but cannot find much information on how to do this. Iv'e been able to embed it onto a page, in a window, but I get this error:

    "An error occured running the unity content on this page. See your browser's JavaScript console for more info. There error was: Uncaught could not load memory initializer Release/builds.html.mem."

    Can anyone have a workaround for this?

    Thanks, Jon
     
  2. MrSkyhenge

    MrSkyhenge

    Joined:
    Jan 4, 2013
    Posts:
    7
    There's UnityDog...but it's a little old. It's actually active on my own WordPress site but I've never done anything with it due to sheer laziness on my part so I can't speak to how well it works. Also, this page has some links to a few forum posts and discussions on Unity Answers about the topic.
     
  3. AndrewRyan

    AndrewRyan

    Joined:
    Apr 7, 2014
    Posts:
    19
    Thanks for the idea Gsterpop, but I want to avoid unity web player. You can build unity in html5 now, which doesn't require the user to download the plugin.
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I had a similar question too. In short "I have a WebGL build, now what?"
     
  5. AndrewRyan

    AndrewRyan

    Joined:
    Apr 7, 2014
    Posts:
    19
    I read this thread that said you had to add MIME definitions for the .mem and .data extensions. I did this using a wordpress plugin, but had no luck. I still return the same error.

    I could try to find the wordpress web config and add definitions for those extensions directly, but i'm surprised there isn't an easier way. Is there truly no tutorials for how to do this? Why would Unity allow you to build HTML5 but noone shows how to use it?
     
  6. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Speed. Unity has a great learn team. But they are often a couple of steps behind the dev team.
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,142
    I don't have a Wordpress installation at the moment to verify, but you should be able to upload your project to a hosting provider (I use shared hosting through Dreamhost) and simply embed it into your site via an iframe plugin.

    https://wordpress.org/plugins/advanced-iframe/

    Or you can simply link to the shared hosting directly like so.

    http://www.ryiah.com/projects/unityexamples/