This documentation outlines the events a hosting client can utilize when interfacing with Unity. These events are dispatched when changes occur within the Unity application, allowing the hosting client to respond accordingly.
Recieved when unity splash screen in shown and app is ready to accept events
{
"message": "initialized"
}
Recieved whenever something is moving, all overlays must be hidden when transition starts and redrawn when transition ends
{
"context": "Office",
"contextData": {
"type": "ViewTransition",
"data": {
"transitionState": "After",
"from": "<From View>",
"to": "<To View>"
}
}
}
The behaviour of overlays should be like entering a transition, except the key are different you hide the overlays when stateType is "Enter"
and show the overlays when stateType is "Exit"
{
"context": "Office",
"contextData": {
"type": "WorkspaceViewDragChange",
"data": {
"stateType": "Enter"
}
}
}
Recieved when a room is focused or created
{
"context": "Office",
"contextData": {
"type": "Room",
"data": {
"roomId": "<Room ID>",
"timelineBoardScreenSpaceLocation": {...},
"chartBoardScreenSpaceLocation": {...}
}
}
}
- Updates the timeline and chart board corners for a specific room.
- Identifies and handles room-specific data within a building.
Recieved when a building is focused or created
{
"context": "Office",
"contextData": {
"type": "Building",
"data": {
"buildingId": "<Building ID>",
"roomPositions": [{...}],
"wallCorners": [{...}],
"rootRoomPosition": {...}
}
}
}
- Updates wall corners and room positions for a specific building.
- Handles data related to building layout and rooms within it.
Recieved when user goes to land view
{
"context": "Office",
"contextData": {
"type": "Workspace",
"data": {
"buildingPositions": [{...}]
}
}
}
- Updates the positions of buildings on the workspace.
Recieved when either of the boards in a room is clicked
{
"context": "Office",
"contextData": {
"type": "Board",
"data": {
"roomId": "<Room ID>",
"board": "Chart"
}
}
}
- Handles interactions with a chart or timeline board within a room.
Recieved when a character moves, there is a different event like this for each of the characters in a room
{
"context": "Office",
"contextData": {
"type": "CharacterLocation",
"data": {
"associatedRoomId": "<Room ID>",
"screenSpacePosition": {
"x": 0,
"y": 0
}
}
}
}
- Tracks character positions within rooms based on screen space coordinates.
Recieved when the + button on the top left of the floor is clicked
{
"context": "Office",
"contextData": {
"type": "BuildingPlus",
"data": {
"buildingId": "<Building ID>",
"level": 0
}
}
}
- triggers a goal popup when goals are available for the selected level.