Skip to content

Compiling MirageXR

Fridolin Wild edited this page Jun 9, 2022 · 72 revisions

Developers have to configure a few things before being able to compile, and there are some additional optional settings that are good to know about.

The system utilises several APIs which require API secrets to be configured. This includes IBM Watson and SketchFab.

The user interface and app presentation can be skinned via config files and mapping tables.

Default server URLs can be changed.

Terms and conditions of use can be specified via a text file.

API keys

The development team has API keys that we share in the development. If you have been invited to contribute, you should have received these keys or should have been granted access.

  • Sketchfab: The API id and secret need to be stored (see API documentation). This involves copying three files into this folder (which is in .gitignore and will not be syndicated!): /Assets/MirageXR/Common/Resources/Credentials'''. The three files are: SketchfabClient.asset''', SketchfabClient.json''', and SketchfabClientWithPassword.asset'''. Subsquently, the sketchfab data object and the sketchfab login with password data object need to be assigned:

sketchfab-setup

  • IBM Watson: you need to put a non-tracked ibm-credentials.env file into the root folder to be able to build the natural language processing capabilities for the character models. You will need to add the API secret key credentials for the following IBM Watson services: Tone Analyzer, Assistant, Speech-to-text, Text-to-speech, and the language translator (optional) services. The file is listed below, just replace the %KEY% values with the according API secrets for each service provided by the IBM Watson dashboard.
TONE_ANALYZER_APIKEY=%KEY%
TONE_ANALYZER_IAM_APIKEY=%KEY%
TONE_ANALYZER_URL=https://api.eu-gb.tone-analyzer.watson.cloud.ibm.com/instances/5f989edc-233e-42a0-98c5-9e1cefcf36c5
TONE_ANALYZER_AUTH_TYPE=iam
ASSISTANT_APIKEY=%KEY%
ASSISTANT_IAM_APIKEY=%KEY%
ASSISTANT_URL=https://api.eu-gb.assistant.watson.cloud.ibm.com/instances/7ca75d0a-966f-4350-91b8-06fb0e882de5
ASSISTANT_AUTH_TYPE=iam
SPEECH_TO_TEXT_APIKEY=%KEY%
SPEECH_TO_TEXT_IAM_APIKEY=%KEY%
SPEECH_TO_TEXT_URL=https://api.eu-gb.speech-to-text.watson.cloud.ibm.com/instances/00f5f658-9d9d-4b76-9505-d07885513919
SPEECH_TO_TEXT_AUTH_TYPE=iam
TEXT_TO_SPEECH_APIKEY=%KEY%
TEXT_TO_SPEECH_IAM_APIKEY=%KEY%
TEXT_TO_SPEECH_URL=https://api.eu-gb.text-to-speech.watson.cloud.ibm.com/instances/a597ad6c-b7a1-479f-a592-4fde6d504b2a
TEXT_TO_SPEECH_AUTH_TYPE=iam
LANGUAGE_TRANSLATOR_APIKEY=%KEY%
LANGUAGE_TRANSLATOR_IAM_APIKEY=%KEY%
LANGUAGE_TRANSLATOR_URL=https://api.eu-gb.language-translator.watson.cloud.ibm.com/instances/a1d20d77-8dae-49db-9aa3-5604e9d07753
LANGUAGE_TRANSLATOR_AUTH_TYPE=iam

Configure Corporate Design and Identity with the BrandManager

MirageXR supports white-labelling. This is implemented via the BrandManager class and the BrandConfiguration Editor window class, which determine key corporate design elements from settings in a configuration file. Most notably, this includes: app name, version number, splash screen image, logo image, and a set of primary colours.

These classes allow configuring all key UI elements centrally. The values are stored in Assets/MirageXR/Resources/MirageXRConfig.txt and will be filed in upon start of the app.

companyName:WEKIT
productName:MirageXR
version:$appVersion
splashScreen:Assets/MirageXR/Logo/wekit-logo-v7.png
logo:Assets/MirageXR/Logo/wekit-logo-v7_620x620.png
SplashBackgroundColor:#000000FF
primaryColor:#2EC4B6FF
secondaryColor:#FF9F1CFF
textColor:#FFFFFFFF
iconColor:#FFFFFFC8
taskStationColor:#FF9F1CFF
pathColor:#FFFFFFB5
nextPathColor:#00FFE7C8

Assets Mapping Table

Moreover, there are asset mapping tables to be set up which allow reducing resource load in the application. As a side effect, this allows rapid adaptation of the UI on a deep level. To set up this required mapping table for prefab assets (using the addressable methods), Unity will automatically prompt developers to configure ("build") a mapping table for where to load asset prefabs from.

Default servers

  • xAPI: The learning record store URL (LRS URL) is set in MirageXRServiceBootstrapper.cs
  • LMS: The URL to Moodle is set

End User License Agreement

Terms of Use: The end user license agreement is stored in Assets/MirageXR/Resources/TermsOfUseDefault.txt and is filed in by the BrandConfiguration class.

Build

Once all is configured, you switch the build target to either iOS, Android, or Universal Windows (target: Hololens) and build.