Search Issue Tracker
Won't Fix
Votes
2
Found in
6000.0.55f1
6000.2.0b11
6000.3.0a4
6000.4.0a1
Issue ID
UUM-113890
Regression
No
Base class's Context Menu method is called when calling it in the Editor from the child class and the child class overrides this method
Reproduction steps:
1. Open the attached “BugRepro” project
2. Select the "TestObject" GameObject in the Hierarchy window
3. In the Inspector window, find the "ChildClass" component and click on its header with right mouse button
4. In the opened menu, select the "Call ContextMenuMethod" option
5. Observe the Console window
Expected result: "ChildClass' ContextMenuMethod called!" message is logged
Actual result: "BaseClass' ContextMenuMethod called!" warning is logged
Reproducible with: 2022.3.65f1, 6000.0.55f1, 6000.2.0b11, 6000.3.0a4
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
Unfortunately ContextMenu are handled in native code. At this point a lot of the Typeinfo is not properly available. This is why only the function with the [ContexMenu] attr is called (and not the derived version). Also, at this point we can't easily check if there is a derived type with the same function.