Roman Ponomarenko

MBS Documentation

About MBS

Modular Building System is a 3D structure creation framework. It provides a codebase to create 3D structures out of modular parts right inside Unity Editor.

Using MBS Asset packs, it is possible to create, share, or sell modular parts for MBS through Unity Asset Store.

Minimum Requirements

MBS v0.1 requires Unity 2019.4 or above. Alpha or Beta versions of Unity may or may not work, but are not supported.

Quick Start

  1. Open MBS / Examples folder.
  2. Load the “DemoScene” scene.
  3. Select the MBSBuilder game object in the hierarchy.
  4. Select the Asset you want to draw in the MBSBuilder inspector.
  5. Move the cursor to the Scene View and try to draw something using the left mouse button. (One-click – start drawing, one more – end drawing).

Main Components

MBS Builder

This is the main component of the plugin. Here you can select the drawing tool, set the drawing parameters, select the asset pack and the asset you want to draw.
There are 2 tools now: the walls drawing tool and the floors drawing tool.

As you can see, there are 3 parameters you can change.

  • Grid Size: sets the grid cells size to which drawing objects will be snapped.
  • Level Height: sets the height of the level that you want to work with.
  • Level Number: changes the actual level. ( level = height * number )
Below you can filter assets by belonging to the asset pack. By default, there is no filter, and you can see all assets under the “All Asset Packs” item.

Drawing Wall

This component will be attached to the wall game object when it is drawn. Here you can replace prefabs that are in the same asset.
And if the wall is in a chain-forming area, you can select the entire chain of the area by clicking on the corresponding button.

Also, if your prefab has child objects you can disable or enable mesh modifications (stretching, corners modifications, and so on) for this particular object through Children Modifications toggles. If the toggle is on, the child object will be affected by mesh modifications, and if the toggle is off it won’t.

Drawing Wall Child

This component will be attached to all children of the DrawingWall object that have the MeshFilter component (LOD objects, or separate child objects). You can use it to select the DrawingWall (parent) object(s) or use it as quick access to the parent functionality – change prefabs, select areas, and so on.

Import AssetPacks

To import AssetPack into MBS please do next:
1. Copy your AssetPack folder to the  MBS/AssetPacks/
* Make sure inside your AssetPack folder contains the “Prefabs” folder and all prefabs inside it have wDD-DD or fDD-DD name ending, where D is a 0-9 digit.

3. That’s all! Now you can use imported AssetPack in MBSBuilder.

Drawing / Building

Start Drawing

First of all, add MBSBuilder to the scene. You can do this via the top menu.
* Tools -> MBS -> Create MBSBuilder

When the MBSBuilder game object is selected you can choose the tool you want to use, an asset you want to draw, then you can move the cursor in the scene view window and start drawing.

  • Start drawing – one left mouse click.
  • End drawing – one more left mouse click.

Grid and Snapping

MBS work is totally dependent on a grid and snapping. The grid in the MBS is a customizable thing – you can change grid cells size. To change Grid Size you can type the value or use link it with the object size or set it by object picker.

To link grid size with object size just press the corresponding button, the value will be automatically set from the size of the selected object.

To set grid size from the size of an object’s size in the scene use the object picker. To use it, just press the corresponding button, and select an object with the needed length in the scene view.

By default, the drawing gizmo is green and unsnapped. But if the cursor is near the endpoints of the wall (front or back), it will snap to the closest point and turn orange.

To disable/enable mouse snapping to wall endpoints use the C button.

Floor Autofill

To automatically fill a closed area with floor prefabs, move the cursor inside the closed area and press the Shift key.

* To avoid filling errors it is recommended to place the cursor in the corner of the area or snap it to the wall.

Changing level (storey)

To change the drawing level set the level height and increase (or decrease) level number. To change the level height you can type the value or use position picker or object picker.

To use position picker – press the corresponding button, and set the pointer to the needed height in the scene view. When the pointer is over the object and it is on the higher point of it – it turns orange.

To use object picker – press the corresponding button, and select the object with the needed height.

To change the level number you can type the value or use the + | – buttons.

Changing wall prefabs

To change the wall prefab – select the wall game object and in the inspector window under the DrawingWall component (or DrawingWallChild) select the prefab you want to change to.

* You can modify multiple game objects at the same time, but it is required to select walls that correspond to the same MBSAsset and the same MBSBuilder.

Grid Settings

Grid Position

To change grid position (visually) just press the G button in the needed point inside scene view.

Colors and Thickness

If you need to change grid settings, you can do this in the material attached to the MBSBuilder. Or find an MBSGridMaterial inside MBS / InternalDataStore / Materials and change the color parameters there.

Disable Grid

If you need to disable the grid just disable MeshRenderer of the MBSBuilder.

Keymap

Here presented only added/changed key behavior. All keys work only in the scene view window.

Escape (1 time) – cancel drawing;

Escape (2 times) – deselect MBSBuilder game object;

Shift (floor tool) – if the mouse cursor is inside a closed area, auto-fill it;

– change grid position;

C– enable/disable snapping cursor to the wall endpoints;

Render Pipeline Compatibility

MBS is the level design tool, it doesn’t care about render pipelines. It does care about the model it works with. But the models (or their materials and textures to be more precise) can be compatible or not compatible with some RPs.

The MBS contains 3 example assets packs out of the box. They are included just to show how flexible MBS is and how much potential it has.

  • 1mSimple_ExamplePack has pretty simple models, with clean standard material attached. To make it work with any other RP just use a built-in material upgrading tool.
  • FantasyDesign_ExamplePack and OldDeisng_ExamplePack contain more complex models with standard materials and texture atlases attached. By default, they should work with any RP (after the built-in material upgrading tool). But some people have problems with URP, so there are URP textures included now, look for them in AssetPackName/Material/Textures/ folder. And don’t forget to set the material ‘smoothness’ parameter to 0.5.

From Developer

1. Thank you for purchasing the plugin, and thus for supporting my project!

2. If you like MBS, I would be grateful if you take the time to leave a review in the asset store!

3. I’m not a native English speaker, and to write docs and other info about MBS I’m using my little experience in English and Google Translate, so, if you found some errors or unusual, incorrect use of language, or something that is hard to understand – please tell me, I’ll be grateful.

0
Would love your thoughts, please comment.x
()
x