Search Unity

Embed WebGL build on Wordpress Website

Discussion in 'Web' started by Harrisonhough, Sep 13, 2016.

  1. Harrisonhough

    Harrisonhough

    Joined:
    May 13, 2014
    Posts:
    12
    Hey guys,

    I would like to know how to go about embedding my WebGL game into my Wordpress website. I have (briefly) tried the iFrame method by uploading the folder into my Cpanel but with no success. I'm not sure if I need to put it in a certain folder or whether that even matters.

    I have also tried using Dropbox but i can't even get that to work.

    If anybody has has success with this or knows how to do it I'd love some help!

    Cheers!
     
  2. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Hello Harrisonhough.

    Before you embed your game into your website, make sure that your game is running well without embedding, i.e. when launched directly from the location where you uploaded it.
     
  3. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    I just upload my game via FTP to a folder off the root, and it works for me. My WordPress site is hosted with GoDaddy.

    Not sure who you're hosted with or what their restrictions are though.
     
  4. Harrisonhough

    Harrisonhough

    Joined:
    May 13, 2014
    Posts:
    12

    Yes the game works fine running it locally through Firefox. Just not if I try to embed through iframe or on Dropbox.
     
  5. Harrisonhough

    Harrisonhough

    Joined:
    May 13, 2014
    Posts:
    12
    When you say off the root do you mean outside of the wordpress directory?
    I am also hosted with GoDaddy

    Also when you say Upload the game you mean the whole folder with the index.html and Release folder and all that?
     
  6. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Upload your html file and release folder to the initial directory your FTP client connects to.
     
  7. Harrisonhough

    Harrisonhough

    Joined:
    May 13, 2014
    Posts:
    12
    So I have tried that again (It's similar to what I did initially) still doesn't work. Could it be perhaps my WP Theme doesn't allow for it or something? Or that WP doesn't allow it because it's outside the WP directory?
     
  8. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Post a screenshot of your ftp root folder.
     
  9. mdtm1g14

    mdtm1g14

    Joined:
    Nov 24, 2016
    Posts:
    1
    I am also looking to do this, however when I reference the FTP location using an iframe it asks for a username and password, is there any way to get around this?

    Thanks in advance