💦 CREATE AND FUCK YOUR OWN AI CUMSLUT 🔥 TRY NOW ♥
Create AI Cumsluts 💦
March 13, 2018

Hex Map 27: Wrapping

This final installment of my Hex Map series covers the much-anticipated topic of how to wrap your map!

Hex Map 27, Wrapping, a Unity C# Tutorial (Catlikecoding)

Comments (13)

D
Dennis Landi · January 8, 2021

Hello. You Hex Map series is the Unity Hex tutorial I've been long searching for. Can't wait to dig into it!

C
Catlike Coding · January 8, 2021

Enjoy!

H
Hervé Ciaravolo · May 12, 2020

me again :-) It is again doing that. the texture is not displayed. I found that when adding a UNIT, the map is showing. It looks like the Map is always in play mode, but in edit mode. I've done nothing else than play, stop, play. Any idea that could help me ? thank you again !

C
Catlike Coding · May 12, 2020

Yes, that sounds like the fog-of-war unexplored visualization. It's the point that the map cannot be seen. Make sure that the map is in the correct state, which includes setting the correct shader keyword.

H
Hervé Ciaravolo · May 9, 2020

restarting from scratch solves the problem. thanks for your feedback.

H
Hervé Ciaravolo · May 6, 2020

Hi Japser, you tutorials are so fabulous. I have one question around the shader you've implemented. It's not compatible with IOS metal and I'm not really good at shader. what would be your advice ? Should I re-start the shader from scratch and keep it compatible with the IOS platform ? I would like to use Amplify Shader (for the ease of use...). thank you again.

C
Catlike Coding · May 6, 2020

Which shader is not compatible how? They're all surface shaders. I expect that all logic could be reproduced in ASE, but I have no experience with it.

K
Karel Zavičák · May 3, 2019

In tutorial Hex Map 7, there are two steps to fix road mesh flickering: Changing render queue and setting Offset. I'm trying to do similar thing using Shader Graph - Render Queue can be set directly in material, but I can't figure out if there is a way how to easily change shader's Offset. Any ideas?

C
Catlike Coding · May 3, 2019

Maybe this helps: <a href="https://forum.unity.com/threads/shader-graph-equivalent-to-the-offset-property-in-shader-code.663550/" rel="nofollow noopener" target="_blank">https://forum.unity.com/threads/shader-graph-equivalent-to-the-offset-property-in-shader-code.663550/</a>

B
Brendan McGoldrick · April 19, 2018

Thanks for that. Now I have a list of each cell that a unit can move and I am currently highlighting each cell. However I was wondering at a high level how to add effects to continuous segments of the hex grid. For instance when I select a unit, I would like to have a glowing continous outline of the cells that the unit can reach. Similar to what happens in Civilization or Total War games. Just wondering if you had any high-level advice or even a tutorial on your side that covered this type of implementation.

C
Catlike Coding · April 20, 2018

You can create such an outline by finding the edges between cells that are in and out of range. Finding those can be added to a search for the reachable cells. Keep track of those edges, so you can put an outline on top of them and later remove it.

B
Brendan McGoldrick · April 6, 2018

A question on the path-finding Search function. After I select a unit, i want to be able to display all hexes the unit can reach in a single turn based on movement cost. However HexGrid.Search is finding the shortest distance between a start and end cell. What would be required to highlight all possible cells that a unit can reach based on their remaining movement points.

C
Catlike Coding · April 6, 2018

That goes back to part 15, Distances. Instead of an exhaustive search, you stop when the distance becomes too great. Each cell that gets included can be put in a list, which you then use to highlight the relevant cells.