
Learn to build a hexagonal grid in Unity, create a procedural layout inspired by Hexachord, spawn and snap hex stacks, and implement the merging mechanic, with shader for main menu.
Create a procedural hexagon grid with a grid generator script, instantiating hexagon prefabs in a two-dimensional grid, controlled by grid size and world position mapping.
Develop a stack controller that uses raycasts and mouse input to move hex stacks onto grid cells, with mesh colliders, layer masks, and occupancy checks to prevent overlaps.
Move a stack by snapping it to a grid hex cell with occupancy check and raycast drag. Highlight target and place stack above the cell, or drop it if unoccupied.
This lecture covers snapping stacks to grid cells, dropping onto valid target cells, and reparenting stacks while disabling colliders to prevent moved items, paving the way for the merge mechanic.
Spawn new stacks by wiring a stack controller to grid cells, trigger on stack placement, and reset after three placements, while setting the game to 60 fps for smooth gameplay.
Refactor and modularize the hexagon stack mechanics by extracting neighbor grid cells logic. Compute similar neighbor grid cells, process complete stacks to destroy hexagons safely, and unparent before animations.
Create and tune a Unity URP lit shader with shader graph, assign it to tower materials, and drive a gradient from the vertex y using a field percent slider.
Hey Friend!
In this course, you will learn how to recreate various mechanics and effects from Hexa Sort, a famous and trending hypercasual mobile game.
We will start by creating a Hexagonal Grid using Unity's Grid Component. (Way simpler than creating our own system)
After you've clearly understood how this works, we will tackle Procedural Hexagonal Grid Creation, the basics actually.
We want to create a symmetrical hexagonal grid that we can then edit to Create Levels.
You will also learn how to create levels, the quick way.
After creating our grid, we will tackle Spawning Hexagon Stacks and controlling them.
We will learn how to Snap Those Stacks on the grid and Merge everything when it makes sense.
The trickiest part of the system is, you guessed it, the Merging Mechanic. We need to Iterate over Every Cell that has been updated during the previous merge.
It might sound weird, but you'll know how to do that after completing the course!
I'm also going to include some lectures on the Shader in the Main Menu, because that's something I find cool.
And if you want me to Explore More Hidden Gems of this game, please let me know!
Ready to jump in? Enroll now!
Disclaimer : This is not a beginner course, you need to have some basic Unity & C# knowledge before starting this course.
It's best if you know about loops, coroutines & actions.