Support email : gvrocksnow@gmail.com

Basic Scene Setup:

1. Create a new scene.
2. Drag and drop the CamRig prefab from the “Runtime Room Builder/Resources/Prefabs” folder. (Delete any existing camera)
3. Create an empty gameobject called “Rooms” at the origin and assign it to the Surfaces Parent variable on the Room Draw script on the Main Camera.
4. (Optional)Add “RoomBuilderEvents” script to the “Rooms” object for triggering specific events called when room is created/edited.
5. Create a plane and name it “Ground Plane”. Add the MainTag script to it and assign the Surface Type value Ground.
6. Add perimeter walls using the “Wall Builder” utility found in “Window/Runtime Room Builder”.
7. Scale the “Ground Plane” so it fits inside the perimeter walls. Multiple ground planes can be used.
8. (Optional) You can add other props to the scene. Each of the objects needs the MainTag script with the Surfaces Type set to “Other Objects”.
9. Add a basic UI using the “Panel_UI” prefab from “RunTime Room Builder/Resources/Prefabs” folder.

 

Messages:

All messages are sent to the “Rooms” object. The “RoomBuilderEvents” script can be used to access these events or your own script can be used.

OnRoomBuilt(RoomInfo roomInfo) – Called when room is built first time
OnWindowPlaced() – Called when window is placed
OnDoorPlaced() – Called when door is placed
OnEquipmentPlaced() – Called when equipment is placed inside/outside room
OnRoomStartEdit(string[] data) – Called when at the start of editing a room. data[0] is RoomName and data[1] is RoomType
OnRoomEndEdit(RoomInfo roomInfo) – Called when finished editing room
OnSave() – Called when game is saved
OnLoad() – Called when game is loaded

 

Classes:

RoomInfo:

RoomInfo.roomName – Name of room (eg. Kitchen(1), DiningRoom(4)). It is the RoomType plus a number appended.
RoomInfo.roomType – Room Type (eg. Kitchen, DiningRoom)
RoomInfo.length – Larger side of the room in grid units
RoomInfo.width – Smaller side of the room in grid units
RoomInfo.windowCount – Number of placed windows in room when room is created
RoomInfo.equipmentCount – Number of total equipment placed in room when room is created

 

ButtonBuildRoom:

ButtonBuildRoom.floor – Assign a floor prefab. Can use different prefabs for each room type.
ButtonBuildRoom.wall – Assign a wall prefab. Can use different prefabs for each room type.
ButtonBuildRoom.door – Assign a door prefab. Can use different prefabs for each room type.
ButtonBuildRoom.window – Assign a window prefab. Can use different prefabs for each room type.
ButtonBuildRoom.equipment – Assign the equipment prefabs to the list.
ButtonBuildRoom.empty – Assign the roomPrefab from prefabs folder or just an empty prefab.
ButtonBuildRoom.roomType – Room Type (eg. Kitchen, DiningRoom)
ButtonBuildRoom.roomMinLength – Minimum length of the larger dimension of the room in grid units
ButtonBuildRoom.roomMaxLength – Maximum length of the larger dimension of the room in grid units
ButtonBuildRoom.roomMinWidth – Minimum length of the smaller dimension of the room in grid units
ButtonBuildRoom.roomMaxWidth – Maximum length of the smaller dimension of the room in grid units
ButtonBuildRoom.maxDoorCount – Maximum number of doors that can be placed in room. Ideally just one.
ButtonBuildRoom.minWindowCount – Minimum number of windows that should be placed in room.
ButtonBuildRoom.maxWindowCount – Maximum number of windows that can be placed in room.