Controlling/Interacting with Unity3D (WebGL Export) using Tumult Hype

Has anyone here ever figured out how to control WebGL exported from Unity3D as IFrames in Hype?

I’m thinking of creating a website with interactions (buttons) inside Hype but a layer underneath those interactive elements there is an Iframe containing an interactive webGL component with different scenes.

I’m wondering how can I trigger interactions from the Hype document to be able to trigger animations in the webgl component form unity3D inside an iframe?

Has anyone ever done this?

I haven’t done this, but the general way to do iframe communication is a function called postMessage() – you can basically setup a listener in the unity iframe for specific commands coming from the Hype document. In response to this message you can then trigger unity animations.

(There’s a lot of postMessage examples around the web and a lot on the forums too for doing other iframe communication tasks)

1 Like