class in UnityEngine.UIElements
/
Implemented in:UnityEngine.UIElementsModule
Optional attribute on overrides of CallbackEventHandler.HandleEventBubbleUp and CallbackEventHandler.HandleEventTrickleDown. Use this attribute to specify all the event types used by the method override. The event dispatcher can then safely skip events not needed for this method if they are identified internally as valid candidates for performance optimizations.
Only use this attribute for performance optimizations, not for filtering out specific event types. All event types specified in an EventInterestAttribute on a HandleEvent method override are guaranteed to be sent to that method. However, event types not specified in any EventInterestAttribute might still be sent to that method under various conditions:
If no EventInterestAttribute is specified, UI Toolkit
assumes that the method doesn't have enough information on necessary event types, and
sends all incoming events to that method conservatively.
It is recommended to use the EventInterestAttribute attribute because it allows
UI Toolkit to optimize performance by skipping unnecessary event-related calculations for methods
that don’t use the event.
EventInterestAttribute | Use this constructor when the affected method uses only specific event types that can easily be determined at compile time. Multiple EventInterestAttribute can be used on the same method to add more type interests. |