Tested on
- [ ] Unity 2019.4.40f1 (LTS)
- [X] Unity 2020.3.48f1 (LTS)
- [X] Unity 2021.3.45f1 (LTS)
- [X] Unity 2022.3.52f1 (LTS)
- [ ] Unity 2023 (no LTS)
- [X] Unity 6 (LTS)
- Install xAPI4Unity package (see below).
- Choose one of the three options to in
xAPI4Unity > Open Fetcher Window (Settings)
in Unity menu to get xAPI Registry folder copy in your project. - Simply edit your JSON files in
Asset/xapi
. Each time you safe a JSON file in that location, the transformation is triggered (if watcher is set toYes
). Of course, you can useUpdate xAPI.Registry
button whenever you wish. But this button is needed in case you turned off the watcher. - On problems or if you disabled the watcher, you can use
xAPI4Unity > Update xAPI.Registry (JSON => C#)
in Unity menu to trigger transformation manually. - In
xAPI4Unity / Open registry page
you can openhttps://xapi.elearn.rwth-aachen.de
.
- Go to you project root and then open
Packages/manifest.json
. - Ensure following entries in your file:
"scopedRegistries": [ { "name": "npmjs", "url": "http://registry.npmjs.com/", "scopes": [ "com.rwth.unity.omilaxr.xapi4unity" ] }]
. - If you already have this registry, just add the scope
com.rwth.unity.omilaxr.xapi4unity
. - Go to the Unity Package Manager to
My registries
and install the packagecom.rwth.unity.omilaxr.xapi4unity
.
- Ensure in "Project settings" > "Package Manager" that you have the scoped registry with following settings:
- Name: npmjs
- URL: http://registry.npmjs.com
- Scope(s):
com.rwth.unity.omilaxr.xapi4unity
- Go to Package Manager.
- Click on the (+) button.
- Select 'Add package by name'.
- Place in 'Name' field:
com.rwth.unity.omilaxr.xapi4unity
.
- Go to Package Manager.
- Click on the (+) button.
- Select 'Add package from git URL'.
- Paste
https://gitlab.com/learntech-rwth/omilaxr-ecosystem/xapi-4-unity.git
and confirm.
For transformation you need a source for the xAPI Registry definitions. You have two options: GitLab
or Local
.
In case of GitLab you will again, fetch data from published GitLab repository.
By choosing Local, you have to define the path for the clone of this repository. The selected path shall have package.json
and definitions
folder in root.
If you choose a path (e.g. ./Assets/xapi
) and click on Clone repository
, the tool will automatically create this kind of source by using git clone. To do it, git cli must be installed.
The only option you need to do here, is to select a path where you want to place your generated C# files of the xAPI Registry. You can place it for example at ./Assets
.
In case you are using the fetcher type Unity
it will transform the JSON files to C# directly inside of Unity Editor. This can be done by using the transform button or the watcher (turned on by default and can be disabled).