Coder Social home page Coder Social logo

buildsystem's Introduction

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.

buildsystem's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.