Godot Version
4.0 and onwards
Question
The Godot editor knows the dimensions of some CanvasItems, as it uses an orange border around these items when they are selected. The same border is also visible in a running game when you switch to the remote scene tree in the editor and select a node.
However, for your (gdscript) classes that inherit from CanvasItem, the Editor does not display the orange bounding box (because, obviously, it can’t know the bounding boxes of these CanvasItems). In a running game, the orange box is shown, but it has a small, standardized size. There used to be a get_rect_item in Godot 2 which the editor used to that purpose, but it is no longer exposed to scripts in Godot 3.
Is there a way to tell the Godot Editor and Engine the dimensions of CanvasItem-derived class via gdscript code so these hints can be shown? The reason I ask is because this would be helpful in debugging.