Skip to content

Instantly share code, notes, and snippets.

@anchan828
Created May 4, 2012 06:57
Show Gist options
  • Save anchan828/2592717 to your computer and use it in GitHub Desktop.
Save anchan828/2592717 to your computer and use it in GitHub Desktop.
NaClのpostMessageをWebPlayerのSendMessageっぽく
function GetUnity() {
return document.getElementById("UnityEmbed")
}
function SendMessage(name, method, parameter) {
GetUnity().postMessage(name + "." + method + "(" + parameter + ")")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment