An interface for DRES, meant to be used in Unity.
This is a upm package, add it through the Unity Package Manager as a package from git using the URL https://github.com/dres-dev/UnityClient.git#main or directly by adding the following to your manifest.json for latest version:
"dev.dres.unityclient": "https://github.com/dres-dev/UnityClient.git#main"This package requires a config file, dresapi.json to be located either at
Assets/(corresponds toApplication.dataPathfor Unity Editor)- The persistent data folder for your platform (i.e. where
Application.persistentDataPathpoints to)
The configuration file contains vital information about DRES:
"host": "example.com/dres",
"port": 443,
"tls": true,
"user": "username",
"password": "password"host: the host address of the DRES instance, either an IP or name (defaults tolocalhost)port: the port of the DRES instance (defaults to8080)tls: whether to use tls or not, i.e. the API calls will behttpswithtrue,falseotherwise (defaults tofalse)user: the DRES user name (+)password: the DRES user passwor (+)
(+): Could be omitted and provided in a separate file (credentials.json), as a sibling to the config file:
"user":"username",
"password":"password"For development, clone this repository into a directory dev.dres.unityclient inside the Packages directory of the Unity project you want to develop in.
$> git clone git@github.com:dres-dev/UnityClient.git dev.dres.unityclient
And subsequently (re-) generate the client libraries:
$> gradlew clean deploy
For developers, it might be necessary to re-open the unity project multiple times, until the pre-checks are okay.