Skip to content

Commit

Permalink
added logs
Browse files Browse the repository at this point in the history
  • Loading branch information
SridharaQweebi committed Dec 18, 2024
1 parent 2d33f73 commit d2ec251
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sim/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ namespace pxsim.hare {

namespace pxsim.unity {

//% blockId=helloUnityNamespace block="helloUnity namespace"
//% blockId=helloUnity block="helloUnity"
export function helloUnity(){
const parent = window.parent as Record<string, any>
if (parent && typeof parent.sendMessage === "function") {
// Call the sendMessage function in the parent window
console.log("MakeCode: calling parent function..");
parent.sendMessage(`SEND_MIXPANEL_EVENT:BtnClickBrowserVideoPlayerClose:VideoId:xx:Timestamp:12`)
}
else{
console.log("MakeCode: parent or function not found");
}
}
}

Expand Down

0 comments on commit d2ec251

Please sign in to comment.