I created a node class that extends CharacterBody2D and would like to share it in the asset library. So I moved the script to the addons folder to test it. When it was in my project directly (not under addons) it would show up in the "Create New Node" dialog under CharacterBody2D. When I move it to addons it no longer shows up as an option when creating a new node. Is that how it's supposed to work?
In the documentation it says you don't have to make an editor plugin for this.
https://docs.godotengine.org/en/4.0/tutorials/plugins/editor/making_plugins.html#a-custom-node
Nodes added via an EditorPlugin are "CustomType" nodes. While they work with any scripting language, they have fewer features than the Script Class system. If you are writing GDScript or NativeScript, we recommend using Script Classes instead.
The docs say it should "appear with its new icon in the editor".
https://docs.godotengine.org/en/4.0/tutorials/scripting/gdscript/gdscript_basics.html#registering-named-classes
You can give your class a name to register it as a new type in Godot's editor. For that, you use the class_name keyword. You can optionally use the @icon annotation with a path to an image, to use it as an icon. Your class will then appear with its new icon in the editor:
Here's the repo but I'll wait until this is resolved before I submit it to the asset library.
https://github.com/37Rb/godot-overhead-car-2d