Configuring Completion
β Sending Completion Events
Once your learning experience is considered complete, you must send a Completion Statement to the Portico Platform.
In the case of Individual Applications you must do this once at the appropiate place in the code. For Modular Applications, you must add a statement for each Module.
When and how you send the completion statement depends on the structure of the learning experience. It could be triggered:
- Automatically, e.g. when the user completes the final task, when a final score is calculated
- Manually, e.g. when the user presses a βFinishβ button.
In order to send a completion statement, you need to call the SendCompletion method, as shown below.
using PorticoXR.Reporting;
public class GameManager : MonoBehaviour
{
public void OnLevelComplete(bool wasSuccessful)
{
// Send completion event
PorticoReporting.SendCompletion(complete: true, success: wasSuccessful);
}
}As an optional parameter, you can also add a Score (in the 0…1 range as a floating point value) that will be captured and displayed on the resulting report.
PorticoReporting.SendCompletion(complete: true, success: wasSuccessful, score: 0.79f);π Returning to Launcher
To ensure a smooth learner experience, your app should call the Return to Launcher method at the end of the learning session. This will close your app and return the user to the Portico VR App.
Since each VR app handles the end of a learning experience differently - such as showing a final scoreboard, an info screen, or allowing continued exploration - youβll need to decide when and how to trigger this method.
Common approaches include:
- The user presses a button to exit the app.
- The app closes automatically after a set time (e.g., X seconds).
- The app closes immediately after a specific end-of-session action.
using PorticoXR;
// This should be called after sending a completion statement
Portico.ReturnToLauncher();