Registering complete in Articulate from a Unity webGL Simulation

May 28, 2019

Hello Heroes,

I have a heady question that I cannot figure out. Basically, I have a simulation that I built in Unity and I exported it as a WebGL. I embedded it as a web object in Articulate which launches the simulation in Microsoft edge browser window. 

My goal is to have the user complete the simulation without getting any steps wrong. My strategy now is when the user passes the simulation, it sends a value to sessionStorage. I have a javascript executing that checks sessionStorage for the variable. I got it to work easily when the simulation is running in an articulate window, but as soon as I change it to have the simulation launch in a different window I cannot get articulate to read the variable.  

The LMS I am launching the eLearning module and simulation out of is Moodle.

Let me know if there is more information needed to figure this out.

"var player = GetPlayer();

var pass = localStorage.launchPass;

if (pass == "1") {
player.SetVar("Passed",true);
} "

^^That is my code that gets the first version to work.

 

1 Reply

This discussion is closed. You can start a new discussion or contact Articulate Support.