Example Project

Download a full featured example project that demonstrates the LoL Unity API.

The LOL SDK V5 includes a Demo project to demonstrate the API usage.

To use the Demo project, follow the instructions to install the SDK into your project, and then:

  1. Set the Build Settings:

    1. Type: WebGL

    2. Scenes: All Demo/ scenes

    3. Project Settings > Player > WebGL Template: LOLWebGL

  2. Open "Demo/_Init" scene

  3. Press "Play" in Editor

The Demo project demonstrates:

  • Creating the LoLSDK Instance in Loading scene

  • Subscribing event handlers, handling payloads, storing in state and using across scenes.

    • StartGame

    • Language

    • Questions

  • Publishing required and optional messages

    • Lifecycle: GameIsReady / LoadingProgress / CompleteGame

    • Speech: SpeakText

    • Reporting: SubmitAnswer / SubmitProgress

  • Unity Editor Development workflow

    • Loads questions.json, language.json, and startgame.json payloads from file to mock platform

    • Control selected language from startgame.json

Note that the Demo project does not yet implement Save/Load State. Please refer to the LegendsOfLearning-Example for this. The LolSDK V6 will include a fully featured reference project.