Skip to content

Samples

Import from Package Manager → RevLearning → Samples → RevLearning Samples. They are not compiled into your project by default — the Samples~ folder has a tilde, so Unity does not import it until you ask.

File What it shows
Scenes/QuickstartDemo Press Play and watch it report, with no LMS
QuickstartExample Initialize, report status and score, commit
QuickstartResumeExample The same, plus suspend and resume through a bookmark
XApiQuickstartExample Configure an endpoint and send statements
Scenes/SCORMValidationScene A panel for exercising a real LMS by hand
Scenes/XApiValidationRunner The same for an LRS

Press Play first

Scenes/QuickstartDemo is one GameObject carrying two scripts: QuickstartExample, which reports learner state, and QuickstartDemoPanel, which draws what it wrote. Open it, press Play, and the Game view shows a panel reading back the live data model — connection, lesson status, completion status, bookmark, session time, suspend-data size and last error — with no LMS, no WebGL build and nothing to configure.

Every value on it was written by one script and read back by another, through RevLearningRuntime.Runtime and out of Cmi. That is the point: it is a round trip rather than a script printing its own local variables, which is the part worth seeing.

The Console carries two lines alongside it, Initialized (stub) and Commit (stub), from the in-memory stub the runtime substitutes outside WebGL builds. Nothing is sent anywhere.

All three sample panels share one look, from SamplePanelStyle, and it is opaque by default. Unity's own box style is translucent at runtime, which suits a HUD laid over content worth seeing and does not suit these: they are readouts, there is nothing behind them in any of these scenes, and one you have to squint at is not doing its job.

That is a default rather than a rule. Every panel has a Panel Opacity slider on its component, so if you drop one of these scripts into a scene where you do want your own content showing through, turn it down. The default is solid because that is right for the scene as shipped, not because translucency is wrong for yours.

The panel is a sample to read and delete, not a UI to adopt. Copy QuickstartExample into your own course; the panel is scaffolding for seeing that it worked.

That works because the runtime substitutes an editor stub outside WebGL builds, so ILmsRuntime is live in play mode and reports against an in-memory data model. The call sequence you are watching is the real one your course would make; only the thing on the far end is fake.

It is a demo, and that is all it is. It proves the wiring, not that any particular platform agrees with it — which is what the validation scenes below are for, and why they are not interchangeable.

The quickstarts

Read QuickstartExample first. It is deliberately the shortest thing that works end to end, and it shows the two places courses go wrong: checking the result of the commit rather than LastError alone, and handling a null Cmi instead of assuming a connection.

QuickstartResumeExample is the one to copy if your course is longer than one sitting. Resume is the feature most likely to be discovered broken by a learner rather than by you, because it only fails on the second visit.

The validation scenes

They carry the same panel styling and the same opacity slider as the demo above, for the same reason: a readout has to be readable.

These are not demos. They are the harness for working through Tests~/CONFORMANCE.md against a live platform: build to WebGL, package, upload, launch, and press the buttons in order while watching what the LMS records.

They earn their place because no automated test can replace them. The two most serious defects fixed before this release — a proxy that swallowed every LMS error, and a refused correct_responses re-write — were both invisible to a fully green suite and both found here, on SCORM Cloud.

Which is also why the panel is worth extending carefully. It shipped for a while able to record only a correct answer, which made incorrect-answer vocabulary impossible to confirm by any live run. A validator that cannot produce the failure case cannot validate the failure case.