Extending CanvasItem

Godot Version

4.2.2.stable

Question

Im trying to create a custom node using classes, however im having issues creating a class that extends CanvasItem.

class_name Node25D
extends CanvasItem

image

When trying to add the node to my scene, it does not show up as an option.
If I for example extend from Node2D it does show under Node2D.
I know CanvasItem is an abstract class but I have read posts from a year ago that do mention being able to extend from CanvasItem.

Hi Shrooms,

Thanks for the reply.

I preferably do not want to use Node2D because I want to reïmplement Node2D in a way that works with a 2.5D environment e.g drawing, position (not a Vector2 but a Vector3) etc.

If I were to use Node2D I would not use half of the properties in Node2D and that seems inefficiënt to me.

Now that a look back on the original post it does mention extending Node2D instead of CanvasItem so I guess its just not possible currently.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.