Android Unity Game Development Blog, Day 6: Death To Drawing Hexagons (almost)

Covyne Entertainment
2 min readFeb 4, 2021

--

What I did:

Today I said goodbye to treating Unity like a 3D modelling tool (almost). I found a problem with my “Handles.DrawLines” method, and for the life of me I couldn’t figure out what it was. Here was the problem:

See how one of the white polygon lines and the “handles” are drawing on top of the UI dialog I created? Yeah well here’s what I tried:

  • Changing various camera settings
  • Putting a Plane object behind the UI
  • Delaying the drawing of the Hexagon lines
  • Randomly bashing my head against the keyboard

What I learned:

I came the the conclusion that even if I find a workaround, it’s really only ever going to be a workaround because I’m using the wrong tool for the job. “Handles.DrawLine” is really made for Gizmos, like using a spanner to bang in a nail.

So I went back to a selection prefab, except for the flashing hexagons — I’ll keep those as they are using a GameObject as their base, and that is at least as close to standard Unity as you’ll get.

Anyway, here’s what it looks like now:

And nothing drawing through my dialog:

What Next?

Turns

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response