1. Using xAPI to Track
Learning Experiences
in Unity Projects
2. Who am I?
Art Werkenthin
CEO RISC, Inc.
artw@risc-inc.com
@AWerkenthin
• LMS/LRS Ecosystem Platform
• Member: cmi5 Working Group
• Author: Learning Solutions Magazine
• xAPI enthusiast
3. I have very little Unity experience (Thanks,
learn.unity.com)
I assume you have a working knowledge of xAPI
This session is technical
We are going to be coding
Can’t do xAPI + Unity without c# programming
Disclaimers
4. Agenda
Why xAPI in Unity?
My First Game
Using the TinCan.Net Library in
Unity
Using the GBLxAPI Library in Unity
The Best of Both Worlds
Resources
5. Why add xAPI
to Unity
Games?
Learning via A/R, V/R and Gaming can attract future
talent
A/R, V/R based training can save money (ex: reducing
time to competency)
A/R, V/R is often used to train for situations that
cannot be created in real life
Simulation allows learners to make mistakes without
consequences
Simulation drives optimal retention over time
But…how are you going to track and analyze?
6. I get asked a lot about adding xAPI to Unity projects
The pandemic led to much more call for VR projects
Thought I should try it myself
I get asked a
lot…
7. My First Game in Unity
https://learn.unity.com/project/roll-a-ball?uv=2019.4
8. Open-source library by Rustici Software to send xAPI
statements from c#
We use a modified version in our LMS/LRS ecosystem
platform
Let’s see some code…
Using
TinCan.Net in
Unity
9. Pros
Addresses all “api” in xAPI (Statements, State, Agent
Profile, Activity Profile)
Flexible: write exact statements you need
Cons
Difficult to integrate due to “code stripping”
TinCan.Net
Pros & Cons
10. Open-source library on GBLxAPI.org for sending xAPI
from Unity
Built-in xAPI vocabulary that targets K-12 learning
games
Disclosure: I was asked to do a code review and made
some small suggestions that were accepted in the 1.1
version.
Let’s see some code…
Using GBLxAPI
in Unity
11. Pros
Very easy to get started (Code stripping is resolved for
you)
Statements are “queued” when the player is offline.
Then syncs when back online.. As long as you don’t shut
the game down.
Library had a major overhaul in 2021.
Cons
The method of using Excel files to modify the vocabulary
never worked for me.
Only addresses writing statements… no other APIs in xAPI
Does not work with newer versions of Unity… but I can
fix that.
GBLxAPI Pros &
Cons
12. Remember, I wanted a leaderboard…
Can I use both GBLxAPI for its advantages, and
TinCan.Net for its advantages?
Let’s take a look…
Best of Both
Worlds
13. We discussed why you should use xAPI in Unity
projects to track learning activities.
We’ve seen two libraries you can use to add xAPI to
Unity.
We’ve discovered that you can use GBLxAPI and get
the Best of Both Worlds
Final Note: This does work in VR; issue is how to get
the actor.
Conclusion