Skip to content

SceneOrganization

Benedikt Hensen edited this page Nov 27, 2018 · 2 revisions

Scene Organization

There are two scenes in the project. One scene is displayed prior to login and one scene is displayed after login. This organization guarantees that the content which is shown after login cannot be viewed before the login has succeeded.

General

The following guide for organizing the game objects is adapted by all scenes:

General Scene Organization

Name Object Description
(1) Main Camera This camera has been imported as a prefab from the MixedRealityToolkit (HoloLens and Desktop version only). Users will look through this camera and attached scripts of the MixedRealityToolkit handle the synchronization of head movements and camera movements.
(2) InteractiveMeshCursor (HoloLens only). This object has been imported as a prefab from the MixedRealityToolkit. It is the gaze cursor which is displayed in the middle of the screen.
(3) UITextPrefab (HoloLens only). This text is attached to the screen and shows up if the user is too close to an object. It will be removed in a future version.
(4) Start Menu Parent The start menu contains the 3D user interface.
(5) Directional Light This light acts as a sun and provides the necessary brightness to light the scene.
(6) ConsistentManagers Contains manager scripts which should be available in all following scenes. Managers on this object can be used to transfer data to another scene. If the program goes back to this scene, the managers will persist, i.e. changed runtime values will be used.
(7) LocalManagers Contains manager scripts which should only occur in the local scene. If the scene is changed, the managers are destroyed. If at a later point, the program goes back to this scene, these managers will use their startup values again, i.e. no value changes from the first visit to the scene are saved.

Consistent Managers

Note that the main configuration of global managers is done in the login scene since this scene will always initialize the global managers. For debugging reasons, the global managers have also been set up in the main scene. If the developer starts debugging in any scene, the values from this scene will be used throughout the testing session. Values of the global managers in the main scene may not be up to date since they are only required for such tests.

Login

The login scene is the startup scene which is displayed if a user starts the app. It can be found in the Scenes folder of the assets and is named Login. It mainly consists of the login menu which will redirect the user to a login Web page and to the main scene if the login was successful.

Main Scene

The main scene, named Scene in the Unity project contains the main functionality like displaying 3D models, their annotations and quizzes. It is opened from the login scene once the authorization was successful.

Local Managers

The main scene contains some specific managers which are only accessible in this scene since they are stored in the LocalManagers game object.

Name Object Description
GreetUser This object contains the GreetUsercomponent which displays a greetings message to the user if the scene is loaded.
Model Load Settings The ModelLoadSettings manager acts as a data container for the model creation process. For instance, the reference to the material for instantiated meshes is looked up on this manager. Additionally, this game object contains the ModelSynchronizer which makes sure that spawning and deleting a 3D model in the workspace is synchronized with remote users.
Sharing This prefab was imported from the MixedRealityToolkit and it contains all necessary scripts for creating and managing a shared session between multiple devices.
RecordingManager The recording manager takes care of the sound recordings for the audio annotations. Other components can call this manager to start or stop a recording.

Other Scene-Specific Changes

  • WorldAnchor: The world anchor contains all 3D models which are loaded into the workspace. It is also synchronized across multiple devices.
Clone this wiki locally