Piece spawner is a level generation tool for Unity.
-
It has been mainly written to be used in grid based 2D puzzle games. It has a user-friendly interface where the user can see, edit, reset the current state of the level in the editor.
-
It is possible to the create the same level with different piece prefabs with different logic or the same logic with different piece appearances.
-
It is also possible to edit the look in the editor to match with the chosen style.
What can be learned:
-
Custom editor window usage with a lot of different features.
-
Simple usages of Property Attributes and Property Drawers.
-
Detached prefab system between logic and the visuals.
-
Usages of creating a generic data containers that is easily extendable.
Note: There is no gameplay code in this project; however, it can easily be integrated either using your relative classes or through inheritance from the current classes.
- Tools/Piece Spawner
- Select Default Data Sets or create your own and place them in the references
- Select your grid sizes and increments
- Combine the preferred piece type and the color type and select the piece that you want to modify
- Spawn the combination of pieces you have modified into the scene and select a path to save it in the project