But this does not work properly for me. The methods that I have bind don’t appear in the doc (except one that was there the first time I created the doc ?!) and when I add content, it is consistently erased by the doctool …
What am I missing? Is there another place where I can read some doc on how to add doc ?
In godot’s source code, the doc is not created if the method starts with ‘_’ AND the method is not virtual
Therefore, it is needed to declare and bind your function as virtual.
To do so, do not declare your method in the header and cpp file as usual. Just use:
in the header : GDVIRTUAL1(_your_method, Variant);
in the cpp file : GDVIRTUAL_BIND(_your_method, "_args");
And that’s it !!!
and there are more functions, some of them: GDVIRTUAL3R_REQUIRED(int, _mix, GDExtensionPtr, float, int); GDVIRTUAL2(_set_parameter, const StringName &, const Variant &); GDVIRTUAL1(_set_paused, bool); GDVIRTUAL1RC(Variant, _get_script_method_argument_count, const StringName &); GDVIRTUAL1RC_REQUIRED(Dictionary, _get_method_info, const StringName &); GDVIRTUAL0(_tag_used_streams) GDVIRTUAL0RC(bool, _is_playing);