A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Introducing the new Universal Render Pipeline and High Definition Render Pipeline subforums!
Unity 2019.3 Beta is out now.
Discussion in 'UIElements' started by wang37921, Jan 17, 2019.
ContextualMenuPopulateEvent.localMousePosition is zero.
any other method?
i access it in menu.AppendAction's callback. its information is clear before be pooled?
Hello! You may want to report an issue for this (https://unity3d.com/unity/qa/bug-reporting), thank you!
ContextualMenuPopulateEvent.localMousePosition still seems to return zero. Is there a workaround for this?
originalMousePosition and mousePosition is also zero. Basically, I am creating a node from context menu and I need to place it where I opened context menu. Unity 2019.3.0b1.
(not tested, just an idea) Maybe try using a MouseDownEvent in addition to the ContextualMenu event. You can register for both and save the mouse position from the MouseDownEvent for future use by your Context.. event handler.
Thanks @uDamian that's a functioning work-around while I wait for a fix.