top of page
MAST_Logo.png

Modular Asset Staging Tool

Primarily intended for staging 3D modular assets in Unity, MAST is very useful for making scenes and levels that are based off of a grid.  Instead of having to drag a prefab into the inspector, then manually move, rotate and flip it, MAST provides a simple interface that lets you do all the above before ever placing the item in your scene.

MAST runs in the Unity editor.  It includes a fully customizable grid that can be raised or lowered at the click of a button, the ability to customize position offsets, and even a robust randomizer for varying props.  Since MAST works with prefabs, there is no limit to what can be placed, including game-ready objects with internal logic components.  Also, MAST contains several other tools, including merging static meshes for efficiency at runtime.

grid.png

Some of the information below has changed.  To find all of the newest features and instructions, use my tutorial videos.

Getting Started

Make sure MAST is within your project’s assets folder.  MAST will be located within the FSP (Fertile Soil Productions) folder.  In the future, any modular kits released for MAST will also be located in the FSP folder.


To open the MAST editor window, click Tools > MAST > Open MAST Window, then dock the window where you wish.

All models must be converted to prefabs before they can be used, and MAST will load all prefabs from a project folder, including subfolders, so organize them accordingly.  To create a prefab, simply drag your model from the Hierarchy window to a folder in the Project window, or use the [Create Prefabs from Models] button inside the MAST Tools window.

Load_from_Folder.png

To load your prefabs into MAST, select the folder in your project that contains your prefabs, then click the load prefabs icon.  You will be presented a confirmation dialog, indicating the folder that's selected.

Grid_Toggle.png

To enable the grid, click the grid icon at the top of the toolbar.  The look and feel of the grid, including snap, can be adjusted in the MAST Settings window.  Use the arrows above and below the grid to move it up or down.

Prefab Palette and Draw Tools

The prefab palette can be adjusted by stretching the window itself and using the column count slider at the bottom.  Click an item in the palette to select it, click it again or press [ESC], to deselect it.  When you select an item, the Draw Single tool is automatically selected for convenience.

Pencil.png
Paint_Roller.png
Paint_Bucket.png
Randomizer.png

The Draw Single tool places the item by simply clicking on the grid.  The ghost of the placed object will show how it will look before clicking.

The Draw Continuous tool places the item repeatedly while the mouse is held down.  It checks to make sure it's not placing the same object multiple times in the same place.

The Paint Area tool places the item within a rectangular area on the grid.  Click on the grid and drag the mouse to define the area.  This tool avoids placing objects where other objects already exist.

The Randomizer tool allows you to add variation to non-modular props, such as trees and rocks.  It places the same way as Draw Single, and can be customized in the MAST Settings window or on the prefab itself.

Eraser.png

The Eraser tool erases any object it is dragged over on this level of the grid.  Move the grid up or down to erase objects at other levels.

Rotate and Flip Tools

These can be performed on an object before or after it's been placed.

Rotate.png
Axis_Y.png

Click to Rotate an object, or use the hotkey: [Space Bar] by default.  The rotation factor and axis can be adjusted in the MAST Settings window or the MAST Component script attached to the prefab.  The rotation will always be completed in world space.  Below the Rotate icon is the axis for rotation.  Click it to toggle between X, Y, and Z.

Flip.png
Axis_X.png

Click to Flip an object, or use the hotkey: [F] by default.  The flip will always be completed in world space.  Below the Flip icon is the axis to flip on.  Click it to toggle between X, Y, and Z.

Placement Settings

Settings.png

Click the Settings icon to open the MAST Settings window.  The first tab contains placement settings.

  • The Placement Destination will be the parent of any GameObject placed using MAST.  It can be changed at any time.

  • If Snap to Grid is turned on, each Object placed will snap to the grid square.  When off, only the Y position will stay on the grid.

  • The Position Offset will be applied to any placed prefab.  This can be used to push trees or rocks into the ground, or to place any object at a position relative to, but not directly on the grid.  You can Override Prefab Settings if you attached the MAST Component script to your prefab.

  • The Rotation Factor affects the behavior of the Rotate tool, allowing you to globally define the rotation factor to use.  Use zero for any axis that should not allow rotation.  By default this allows 90 degree rotation only on the Y axis.  You can also Override Prefab Settings if you attached the MAST Component script to your prefab.

  • Randomizer

    • Randomize Rotation must be set to on for any axis the prefab ​can be rotated on.

    • Randomize Scale

      • Lock ​is used to either keep the object scale relative for the X and Z axis or for all axis.  This keeps a tree round even after randomization.

      • Minimum and Maximum define the size of the scale (i.e. 0.5 for half scale and 2.0 for double the scale).

    • Randomize Position Minimum and Maximum default the bounding box opposite corners to vary the position.​

    • Use Override Prefab Settings if you attached the MAST Component script to your prefab.

GUI Settings

Settings.png

Click the Settings icon to open the MAST Settings window.  The second tab contains GUI settings.

  • Toolbar Position changes when the toolbar icons are on the left or right side of the palette.  This allows MAST to more easily be docked to the left or right side of Unity.

  • Palette

  • Background Color changes the color behind the prefabs (dark, gray, or light).

  • Thumbnail Pitch and Yaw changes the direction of the camera used to create the thumbnails.  Experiment with these values and reload the prefabs in MAST to see the changes.

  • Grid

    • Unit Size the size of a grid unit.  Use the value 1 to match Unity's grid.

    • Use Count to change how many squares are in the grid.  It is measured from center to edge, so a value of 50 results in a 100x100 grid.

    • The Major Line Every value determines how often to draw a more prominent line on the grid.

    • Fill Color, Major Line Color, and Minor Line Color can be changed to change the look of the grid.  Also, the material for the grid can be modified in the MAST/etc folder.

Hotkey Settings

Settings.png

Click the Settings icon to open the MAST Settings window.  The third tab contains Hotkey settings.

  • Key is the key used in the Hotkey.  Unity may not be friendly to all keys and already has uses for certain keys, such as “QWERTY”, so be careful when choosing!

  • Modifer is whether [SHIFT] needs to be held while pressing the Hotkey.  [CTRL] and [ALT] will be added later.

Retaining Your Custom Settings

All settings are saved to scriptable objects, 3 separate files for Placement, GUI and Hotkeys.  They are located in the MAST/Settings folder.  You can duplicate these and move them to your own folder to keep your own settings separate from MAST.  This way, downloading future updates will not overwrite your customized settings.

To link the MAST to your own saved copy of each settings, select your saved settings file and open the MAST Settings window.  Go to the appropriate tab and scroll to the bottom of the window.  Click the [Load <type> Settings from selected file in Project] button.

Tools Window

Tools.png

Click the Tools icon to open the MAST Tools window.

  • Create Prefabs from Models takes any models in the selected project folder, and converts them to efficient prefabs.  It does this by:

    • Stripping out materials, removing any duplicate materials in the process.  It does this by the material name, so unique materials should all have unique names.

    • Deconstructing the meshes, splitting meshes that have multiple materials into a mesh for each unique material.

    • Reconstructing the meshes into GameObjects, assigning appropriate materials, attaching the MAST component script, and creating Prefabs from each one.

 

This process can take a while and a progress bar will be added eventually.  Just make sure to allow this process to complete.  The final result will be 3 subfolders:  Materials, Meshes, and Prefabs.  The original models are not affected in the process.

  • Add MAST Script to Prefabs attaches the MAST component script to each prefab. use this on prefabs you create yourself, since the Create Prefabs from Models process already does this.

  • Remove MAST Components removes the MAST script from any GameObjects under the selected Parent GameObject in the hierarchy window.  It is meant to be used once your scene is completely finished, but is not required for your game to run.

  • Merge Meshes by Material takes all game objects under the selected Parent GameObject in the hierarchy window, and merges them by material.  The finished product contains a new parent and one GameObject for each material.  Also, if you specified in any prefab's MAST Component script to not Include In Merge, they will be included as separate GameObjects under the same parent.

MAST Prefab Component Script

Any prefabs generated by MAST will contain an attached script that MAST uses to determine how the prefab should be handled.  You can change these settings for each of your prefabs individually:

  • Place Inside Others tells MAST whether this prefab can coexist in the same spot as another prefab.  This should be on for any solid object, otherwise multiple copies of the prefab could occupy the same space.

  • Offset Position is discussed in the Placement Settings sections above.

  • Rotation Factor is discussed in the Placement Settings sections above.

  • Scalable tells MAST the object can be stretched.  This is used by the Paint Area tool.  Instead of creating a rectangular area filled with copies of a prefab, it instead creates one object from the prefab, positioned and scaled to fill the area.

  • Randomizer settings are all discussed in the Placement Settings sections above.  In addition, you can toggle Randomizable on or off here, telling MAST if this object can be used in the Randomizer tool.

  • Include in Merge tells MAST whether to include this prefab when using Merge Meshes by Material in the Tools window.  Instead of being merged with the other models, it will just be copied to the new GameObject as-is.

Feedback and Bug Reporting

I hope that this tool comes in handy for staging your projects.  It is completely free and any revenue I will receive will be from donations.  If you want to donate, you can donate when downloading MAST or any of my model kits from itch.io.  You can also become a patron by clicking the Patreon link in the first section of the main page.

I've created a forum for all things MAST.  It is located at:  https://fertile-soil-productions.itch.io/mast/community

Please use the forum to give any general feedback, feature requests, or bug reports.

bottom of page