Skip to content

Instantly share code, notes, and snippets.

View McArdellje's full-sized avatar

Joseph McArdell McArdellje

  • United Kingdom
View GitHub Profile
@McArdellje
McArdellje / CircularMenu.cs
Last active October 25, 2024 15:45 — forked from alexanderameye/CircularMenu.cs
Circular menu for the Unity Editor
// original:
// https://ameye.dev/notes/unity-circular-menu/
// https://gist.github.com/alexanderameye/1eef648d7d1699a9548bc2de3dde2a45
// improvements:
// - can now set "Priority" on buttons to be able to give them explicit ordering
// - instead of pressing the menu keybind or clicking on the actual button of an item, clicking and pressing the keybind have the same effect and trigger the currently highlighted item
// - you can "trigger item" with your cursor in the center of the menu to dismiss the menu (just like you can do in blender)
// - hovering over the center of the menu or any of its buttons no longer "locks up" the menu
// - menu will no longer trigger when moving to the left (default bind was A but it didn't check if you were using the right-click fly cam so the menu would open up any time you pressed A, including when moving)

Keybase proof

I hereby claim:

  • I am j-e-mc on github.
  • I am mcardellje (https://keybase.io/mcardellje) on keybase.
  • I have a public key ASAYwdf_cvzcPOx9JWJ2G-7iqkj73b_fguWHMVnqPiXPKgo

To claim this, I am signing this object: