|
2 | 2 |
|
3 | 3 | An interface for [DRES](https://github.com/dres-dev/DRES), meant to be used in [Unity](https://unity.com/).
|
4 | 4 |
|
5 |
| -**Note: This is heavily Work-in-Progress** |
| 5 | +## Usage / Installation |
6 | 6 |
|
7 |
| -## Usage |
| 7 | +This is a upm package, add it through the [Unity Package Manager](https://docs.unity3d.com/Manual/Packages.html) as a package from git using the URL `https://github.com/vitrivr/DresUnityInterface.git#main` or directly by adding the following to your `manifest.json` for latest version: |
8 | 8 |
|
9 |
| -This is a upm package, add it through the Unity package manager as a package from git using the URL `https://github.com/vitrivr/DresUnityInterface.git#main` or directly by adding the following to your `manifest.json` for latest version: |
| 9 | +```json |
| 10 | +"dev.dres.unityclient": "https://github.com/vitrivr/DresUnityInterface.git#main" |
| 11 | +``` |
| 12 | + |
| 13 | +## Configuration |
| 14 | + |
| 15 | +This package requires a config file, `dresapi.json` to be located either at |
| 16 | + |
| 17 | +* `Assets/` (corresponds to [`Application.dataPath`](https://docs.unity3d.com/ScriptReference/Application-dataPath.html) for Unity Editor) |
| 18 | +* The persistent data folder for your platform (i.e. where [`Application.persistentDataPath`](https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html) points to) |
| 19 | + |
| 20 | +The configuration file contains vital information about DRES: |
10 | 21 |
|
11 | 22 | ```json
|
12 |
| -"org.vitrivr.unityinterface.dresapi": "https://github.com/vitrivr/DresUnityInterface.git#main" |
| 23 | +"host": "example.com/dres", |
| 24 | +"port": 443, |
| 25 | +"tls": true, |
| 26 | +"user": "username", |
| 27 | +"password": "password" |
| 28 | +``` |
| 29 | + |
| 30 | +* `host`: the host address of the DRES instance, either an IP or name (defaults to `localhost`) |
| 31 | +* `port`: the port of the DRES instance (defaults to `8080`) |
| 32 | +* `tls`: whether to use tls or not, i.e. the API calls will be `https` with `true`, `false` otherwise (defaults to `false`) |
| 33 | +* `user`: the DRES user name (+) |
| 34 | +* `password`: the DRES user passwor (+) |
| 35 | + |
| 36 | +(+): Could be omitted and provided in a separate file (`credentials.json`), as a sibling to the config file: |
| 37 | + |
| 38 | +```json |
| 39 | +"user":"username", |
| 40 | +"password":"password" |
13 | 41 | ```
|
14 | 42 |
|
15 | 43 | ## Development
|
16 | 44 |
|
17 | 45 | For development, clone this repository into a directory `org.vitrivr.unityinterface.dresapi` inside the Packages directory of the Unity project you want to develop in.
|
18 | 46 |
|
| 47 | +``` |
| 48 | +$> git clone [email protected]:vitrivr/DresUnityInterface.git org.vitrivr.unityinterface.dresapi |
| 49 | +``` |
| 50 | + |
| 51 | +And subsequently (re-) generate the client libraries: |
| 52 | + |
| 53 | +``` |
| 54 | +$> gradlew clean deploy |
| 55 | +``` |
| 56 | + |
| 57 | +For developers, it might be necessary to re-open the unity project multiple times, until the pre-checks are okay. |
| 58 | + |
19 | 59 | ## Contributors
|
20 | 60 |
|
21 | 61 | - Florian Spiess [@Spiess](https://github.com/Spiess)
|
|
0 commit comments