Skip to content

Creating a New House Environment

Dipendra Misra edited this page Nov 5, 2018 · 1 revision

Building a new house

Currently, there are three house styles set up for these simulation environments

House Style 1

Style1

House Style 2

Style2

House Style 3

Style3

These maps are set on the screen based on the numbering of your house. See the MapControl script for more information.

Note: Leave all the maps inactive when building, the Map Control script will handle the activation of the appropriate map and will also update the player's new location on the map.


Building the project

Make sure that the Base scene is the first one, with index 0. Base is the first scene that is loaded so if it is not the first scene in the build, the environments will not load! The order of any of the other rooms does not matter, as rooms are loaded by room keyword and not index. Depending on if this is a player environment or a bot environment, make sure you are setting the correct one active in Base scene, and that in all the other scenes, that there is no gameobject of type Player active in them.

Build Order

Creating a new House Style

If you want to create a new house style with existing rooms, create your radar in a scene, set it to inactive, apply the prefab for the player screen and update the MapControl script, to parse for your map at runtime.

For each new house, create a new HouseSetup scriptable object with housex naming. In the inspector fill in the names for each room type and the scene that you want associated with it. If your house does not have a certain room type, leave the space as is.

Creating a new type of Room

Current types of rooms: Livingroom, Kitchen, bedroom,bathroom, hallway, guestroom, diningroom

To create a new type of room the following scripts will need to be updated:

  • MapControl- Add the new type of room, so that the yellow player circle can move to the respective room square in the map
  • RoomManager - Add your new room to the spawn location case in SpawnPlayers()
  • Create a new RoomData scriptable object with the name of your new type of room
  • RoomIdentifier - update rooms and also in the inspector, drag your new RoomData scriptable object to the associated room in the inspector
  • SceneLoader - add new room with name of room, set the scene association in GetSceneNames()and add a case for LoadDestination(Room loadRoom) NOTE Add the new room to the Enum room at the top!
  • HouseSetup - Update the scriptable object script to include the new room type