Unity Issue Tracker - Unable to override the internal abstract "ContextualMenuManager.CheckIfEventMatches(EventBase)" method when inheriting from the "ContextualMenuManager" class
Fixed
UUM-128163
Unable to override the internal abstract "ContextualMenuManager.CheckIfEventMatches(EventBase)" method when inheriting from the "ContextualMenuManager" class
Unity 6000.2 has reached its end of life and will not receive further updates. If you need additional fixes, please upgrade to a newer Unity version.
Reproduction steps:
1. Create a new project
2. Save the attached “test.cs“ C# script in the “Assets” folder of the project (link in the internal comments)
3. Observe the Console after the domain reload finishes
Expected result: No errors appear in the Console
Actual result: CS0115 and CS0534 errors are thrown in the Console
Reproducible on: Windows 11 Pro (25H2)
Not reproducible on: No other environment tested
Notes:
This issue makes it impossible to inherit from the “ContextualMenuManager” class, as it requires an implementation of “ContextualMenuManager.CheckIfEventMatches(EventBase)” method, which is internal and cannot be overridden
When testing pre-FAV versions, the “internal override bool CheckIfEventMatches(EventBase evt)” method will need to be deleted from the script for the script to compile
Full error messages:
”Assets\test.cs(16,28): error CS0115: 'test.CheckIfEventMatches(EventBase)': no suitable method found to override”
“Assets\test.cs(4,14): error CS0534: 'test' does not implement inherited abstract member 'ContextualMenuManager.CheckIfEventMatches(EventBase)'“
Prioritise and Follow this issue
Have a workaround or additional info about this issue?