-
Notifications
You must be signed in to change notification settings - Fork 9
Creating a New House Environment
Currently, there are three house styles set up for these simulation environments
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.
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.
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.
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 inSpawnPlayers()
- 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 newRoomData
scriptable object to the associated room in the inspector -
SceneLoader
- add new room with name of room, set the scene association inGetSceneNames()
and add a case forLoadDestination(Room loadRoom)
NOTE Add the new room to the Enumroom
at the top! -
HouseSetup
- Update the scriptable object script to include the new room type