nested menus at runtime?can i use GenericMenu?

hi, i’m trying to make a nested menu that pops up when i click the right mouse button, exactly like windows right mouse button works, this sub level nesting. i see that GenericMenu class kind of does that in unity editor but i want this at runtime so my users can use it.

this must me a very common thing, can someone point me to some simple code or must i create it from scratch? thanks

There are almost certainly some assets on the asset store that do this but I haven’t used any personally.