Skip to content

Simple modular building system for Unity 3D

Notifications You must be signed in to change notification settings

vizjoy/BuildSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

BuildSystem

A simple Modular Building System for Unity 3D

In the repo you will find a Unity Package. The package contains all scripts, models, and prefabs that I used to build the system in the tutorial video.

Below you will find a quick guide on how to set up your models. Remember you will need 2 different models for each thing you want to build. One will be the actual model you player can walk on and interact with in your game. The other will be the "preview" that the player can position in your game.

Setup

-------Tags and Layers------


-You will need to make a different Tag for each snap point type, such as Foundation_SnapPoints, Wall_SnapPoints.....
-Create a new layer for you preview gameobject. This is important and if you skip this step it will glich out

--------SnapPoint--------


SphereCollider -> Radius = 0.25
SphereCollider -> IsTrigger = True

--------Prefab-----------


-Just add a material so it stands out(if using a primitive)
-No tag
-No layer

--------Preview GameObject--------


Layer -> Set it to somthing like BuildLayer(or whatever you want it to be)
Box Collider -> IsTrigger = True
Rigidbody -> useGravity = False
Rigidbody -> isKinematic = true
Add the Preview Script

--------Build Manager Gameobject--------


Create an empty and add in the BuildSystem, and the BuildManager
The BuildManager script is optional. In your game the BuildManager.cs will be replaced by your Inventory, HotBar, or someother source.

About

Simple modular building system for Unity 3D

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published