Skip to content

Dashboards

caxawu edited this page Aug 17, 2020 · 1 revision

Dashboard Controller Prefab

Find this prefab under Assets -> Prefabs -> Dashboard -> Dashboard Controller and drag it into the scene under the LeftControllerAnchor. This prefab contains all three dashboard types as children.

In the inspector, DashboardController.cs will have a public variable for the array dashboards (typically in a new scene, you will include all 3). There is also a public variable for the current dashboard. Drag in the dashboard you want to start with in a scene (typically the tutorial dashboard).

Dashboard Types

Tutorial Dashboard

Controlled by the TutorialDashboard.cs script. This script works in conjunction with the TutorialController to go through all the tutorial steps. When all the tutorial steps are done or when skip is pressed, it replaces this tutorial dashboard with the home dashboard.

Children

Dashboard TMP: The TextMeshPro that displays text during the tutorial. Don't edit the text here as the tutorial steps will grab a reference to this TMP and override the text. Edit the text in the inspector of your tutorial steps instead.
Skip Button: Skips the tutorial when pressed.

Home Dashboard

Controlled by the HomeDashboard.cs script. This script controls the home dashboard and listens for button presses that replays the tutorial, goes back to the lobby, and switches to the vision select dashboard.

It reveals a few different variables in the inspector:
Dashboard Text: The text that you want displayed on the home dashboard.
TMP: The TextMeshPro component that displays the text. (Drag in the Dashboard TMP parented under the Home Dashboard).
Is Lobby: A boolean that, when checked, does not turn on the To Lobby Button or Other Visions Button.
Replay Button: Drag in the Replay Tutorial Button parented under the Home Dashboard.
Replay Scene: The name of the current scene to reload. (Example: to replay the Forest tutorial, put ForestScene in this slot).
To Lobby Button: Drag in the To Lobby Button parented under the Home Dashboard. Lobby Scene: The name of the lobby scene to return to.

Children

Dashboard TMP: The TextMeshPro that displays home text. Don't edit the text here as HomeDashboard.cs will grab a reference to this TMP and override the text. Edit the text in the inspector of your Home Dashboard gameobject instead.
Replay Tutorial Button: The button that, when pressed, will replay the tutorial.
To Lobby Button: The button that, when pressed, will move the player back to the lobby scene.
Other Visions Button: The button that, when pressed, turns off the home dashboard, and turns on the other visions dashboard where players can choose to see through the eyes of animals that are not native to this environment. (Example: seeing through a bee's eyes in the forest.)

Vision Select Dashboard (TODO)

Controlled by the VisionSelectDashboard.cs script. This script controls the vision dashboard and listens for button presses to go back to the Home dashboard.

It reveals one variable in the inspector:
Back to Home: Drag in the Back To Home Button parented under the Vision Select Dashboard.

Children

Dashboard TMP: The TextMeshPro that displays vision select text. Edit the text here.
Back To Home Button: The button that, when pressed, turns off the vision select dashboard and turns on the home dashboard.
Bee Button: The button that switches the vision type to bee vision.
Tarsier Button: The button that switches the vision type to tarsier vision.