- Home /
How to create a hexagon skills graph with Unity UI?
Hi there,
I'm fighting a bit trying to come up with a proper way to create a hexagon-shaped graph that would show the player skills/attributes and be modified depending on their value. Let me show you a quick mockup of what I'm seeking:
(Just made up those stats, but you get what I mean) Now, how could I achieve something like that? The way this works is simple, if the player tweaks a given skill, its 'vertex' of the green 'star' goes higher or lower depending on the skill's value.
Initially, I tried to create something like this in the form of some sort of ProgressBar, but to no avail. Is there a way to set up that kind of menu using Unity's UI tools?
Thanks in advance.
Answer by hexagonius · Jul 02, 2017 at 09:10 AM
I found this forum post with code examples to modify UI vertices:
https://forum.unity3d.com/threads/custom-mesh-rendering-under-ui-canvas.265700/
What you basically need is a working hexagon and access to it's 6 corner vertices. Then, you position those depending on your values along a line from your center to the outer points.
Nice, thanks for the link! I'll be definitely checking that thread.
Your answer
