com.rwth.unity.omilaxr.xapi4unity
v2.1.6
Published
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.
Downloads
198
Readme
xAPI4Unity
Getting started
- 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
.
Install package
Adding scoped registry by using manifest.json (quick way)
- 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
.
Install by using scoped registry
- 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
.
(Alternative) Install by using Git url
- 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.
Setup JSON Definitions Location
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.
Fetcher configuration
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
.
JSON Watcher
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).