Website and HTML5 Game Interaction.

Hi.

I have a javascript in my webpage and I have a function called ( HelloUnity ). How could I call that function from my webpage and show the string message into my html5 game ? What is the best way ?

myPage.js

      function HelloUnity()
      {
        var text = "HELLO";
      }

Thank You

Found this in the docs:

Hi

I am trying be using the example on that link:

but My button ( Change WebGL string ) is not working. What I need to do it?

Look my test

Thank You

What does your code look like? The error says “gameInstance.sendMessage is not a function”. The method is “SendMessage” not “sendMessage”. Is that the problem?

1 Like

Thank You

1 Like