This is an package with has editor tools to use work with xAPI definitions more easy. Developers can design xAPI definitions and transform them directly to C# code.
xAPI4Unity is a Unity package designed to bridge xAPI functionalities into Unity projects conveniently. It enables seamless integration of xAPI JSON definitions and transforms them into C# scripts you can use in your applications. This tool provides support for xAPI registry handling, editor tools, and watcher-based transformations.
---
---
---
Unity Menu > xAPI4Unity > Setup xAPI definitions. Select how you want to fetch the xAPI registry:Assets/xapi folder for your xAPI JSON files. Changes are automatically transformed into C# if the watcher is enabled. Alternatively, use the Update xAPI.Registry button for manual transformation.xAPI4Unity > Update xAPI.Registry (JSON => C#) to trigger transformation manually if required.https://xapi.elearn.rwth-aachen.de via xAPI4Unity > Open registry page in the Unity menu for more information.---
Packages/manifest.json in your Unity project root.json
"scopedRegistries": [
{
"name": "npmjs",
"url": "http://registry.npmjs.com/",
"scopes": [
"com.rwth.unity.omilaxr.xapi4unity"
]
}
]
`
3. Add the com.rwth.unity.omilaxr.xapi4unity scope if another registry is already defined.
4. Open Unity's Package Manager, go to My Registries, and install com.rwth.unity.omilaxr.xapi4unity.$3
1. Navigate to Project Settings > Package Manager.
2. Add the following scoped registry:
- Name: npmjs
- URL: http://registry.npmjs.com
- Scope(s): com.rwth.unity.omilaxr.xapi4unity
3. Open Package Manager, select Add package by name, and input com.rwth.unity.omilaxr.xapi4unity.$3
1. Go to Package Manager.
2. Select Add package from git URL.
3. Paste https://gitlab.com/learntech-rwth/omilaxr-ecosystem/xapi-4-unity.git and click Add.---
Setup Guide
$3
You need a source for xAPI Registry definitions for transformation:
- Git Repository: Fetch definitions directly from a published GitLab repository (requires git CLI installed).
- Local Source: Select a local directory with the definitions folder at its root.$3
- Configure where the generated C# files from xAPI definitions will be saved. For example, you can set this to ./Assets.$3
- When enabled, xAPI4Unity automatically detects changes in JSON files in the Assets/xapi folder and triggers transformation into C#. The watcher is enabled by default but can be disabled via settings.---
Developer Notes
$3
Feel free to create pull requests or raise issues to help improve xAPI4Unity. Contributions are always welcome.$3
This project is licensed under the AGPL-3.0-or-later. See the LICENSE` file for details.