hello, I want to run webgl in wordpress. I did some research, I think it used to be done with iframes, but now I guess wordpress doesn’t support iframes. but even if it supports i don’t want to use iframe. I want to run unity build on wordpress. first i uploaded a build to aws s3 server but then i didn’t know how to call that link in wordpress. then there is a plugin called file manager in wordpress as if it works like a server i guess i don’t quite understand if i put the files there, i think maybe i can make it work but i need to buy a plan for that i wanted to know if it is possible before i do that, can anyone help me if anyone knows about it? Or is there a better way? The main purpose is to run the game on wordpress. I want the wordpress site to communicate with unity by sending a message from unity to javascript.
Do you need to send that parameter only on startup and it doesn’t matter if the WebGL site is a static html page? If so, you could link to an URL to a static page where your content is hosted, and the URL encodes the parameters. May need some PHP scripting though to pass URL parameters to the WebGL build.
Perhaps a plugin like this one best suits your needs: HoweScape Unity3d WebGL – WordPress plugin | WordPress.org
Or this asset: https://assetstore.unity.com/packages/tools/integration/wp-webgl-plugin-2020-1-3-75091?aid=1011l3q6a&utm_source=aff
Actually, I’m not entirely sure about the things you mentioned about whether the page should be static or not, but I can say that I want to run Unity inside the website, that is, in the middle of an e-commerce site, I want to see and edit the products with 3d models. this is actually my only problem and after editing that product, I want to add it to the wordpress cart, I think I need communication for this
Best to use an IFrame then. For communication with Wordpress you could set up a REST API, perhaps the shop software itself already provides means to do that. You can use UnityWebRequest API in the WebGL build to do the communication.
hmm got it i guess it would be better to do it that way yeah Thank you