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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.