Skip to content

🎨 This script turns your source sprite in a prefab composition of GameObjects based on it assigned "GameObject: Color" pairs.

License

Notifications You must be signed in to change notification settings

coelhucas/unity-rgba-level-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity RGB Based Level Generator

Overview

During my spare time playing with a Dungeon Crawler prototype, I decided to make this simple algorithm (the main script has only 73 SLOC and you can get it here) to level design prototyping.

Basically, it turns a Texture2D into a GameObject.

This base system has support to N GameObject: color pairs. You just need to increase the Instances To Generate size, drag 'n drop your objects and see the magic happens.

With that you can build entire levels from a simple pixelated image. This is useful to turn concept to live having only one minimap like and the desired props to be used. Remember that you need to feed it with a Source Sprite [Texture 2D] which will be read (the sprite must have write/read permission) and used to generate the map. By default, all the generated room prefabs are going to the Assets/Resources/Prefabs/GeneratedOutput folder.

About

🎨 This script turns your source sprite in a prefab composition of GameObjects based on it assigned "GameObject: Color" pairs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages