How to Access the Module Manager Edit

You can access the Module Manager via Window > MBS Manager.


Module Manager

Using the Module Manager Edit

Using the Module Manager is very simple.

  • Add new modules with the Add New Building Module button.
  • After changing settings, press the Update button to rebuild the relevant prefabs.
  • Remove Modules with the Remove button.

Where To Find Prefabs Edit

Your prefabs will be created and stored at Assets\Resources\ModularBuildingSystem\Prefabs\BuildingModules. It's important not to move them from this folder or delete manually, instead you can delete them via the module manager remove button.


Prefab File Structure

Common Module Settings Edit

  • Building Module Name - Unique name for this module.
  • Building Module Type - The type of Module, (Foundation, Pillar, Wall etc)
  • Layer - This is the layer that the RayCast will interact with, generally for FPS views this needs to be Building Structure, with RTS views it needs to also be Terrain.
  • World Mesh - This is the mesh that is seen in the world by players.
  • World Material - This is the material seen in the world by players.
  • Building Structure Mesh - This is the mesh used as a collider for when placing modules in game. This can be the same as the World Mesh but if you want to use a lower poly or more blocky mesh you can select this here.
  • Placement Mesh - This is the preview mesh that changes red and green to indicate if a module is placeable or not.
  • Placement Material - There is a placement material that comes with MBS but you can select custom materials here.
  • Placement Box Collider Scale - The placement box collider size can be scaled up or down using this value, set to 0.9 by default. This prevents false positives when detecting intersections.
  • Raycast Type - The raycast type can be either Camera (FPS) or Mouse (RTS). If set to camera the raycast will be shot out from the center of the screen and if set to Mouse the raycast will be shot from the cursor's position.
  • Raycast Distance - This is the distance the raycast should travel. When using the Mouse Raycast Type this value is ignored and MBS will use Inifinity instead, this value only works with Camera Mode. If a raycast doesn't hit a building structure collider, it will position the placement mesh at this distance away from the camera.
  • Mouse Rotation - Whether or not to use mouse rotation.
  • Rotation Increment - The amount of rotation applied.
  • Rotation Keys - You can optionally setup 4 keys to do rotation also.
  • Grid Size (X, Y, Z) - The grid snap size.
  • Module Size (X, Y, Z) - This is the size of the module, it's important to set these correctly as the system uses this module size when doing things like pillar checks. It also generates colliders based on these values so make sure you get the values correctly.
  • Y Offset - This is a value that offsets the placement mesh when in game using the system, for now you only really need to use this with foundation type modules.

MBS Building Module Settings

Community content is available under CC-BY-SA unless otherwise noted.