Skip to content

ViktorBraichenko/Generators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme

Hi! I've create my realisation of procedural generation. It's include 2 different variant of it: weapon generation like in Borderlands and Fallout and building generation.

Building Generator

The main idea of this generator is to create dependency system of building "pieces".

    BuildingPiece SpawnPieceLayer(BuildingPiece[] pieceArray)
    {
        BuildingPiece piecePrefab = pieceArray[Random.Range(0, pieceArray.Length)];
        BuildingPiece clone = Instantiate(piecePrefab, transform);
        return clone;
    }

Also added code for more "logic" construction of building. As example, we can't have doors on lvl > 2. Building piece include 3 empty transforms - it's created to have posibility to reuse this system with different meshes. Thanks Yevheniy Raievskyi that help me with part of logic. 1 2

Weapon Generator

The main idea is to create main object - and instantiate other parts on empty transform to create generation of pieces. 3 4

Tech Stack

Client: Unity, C#

About

My version of realisation of procedural generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors