Godot: Proposal for NativeScript

Created on 23 Dec 2017  路  4Comments  路  Source: godotengine/godot

Godot version:

NativeScripts is a kind of Script language which is much diffrent with other langues as we can't browse the code of them. So it is hard to know the methods and properties provided without documentations.
I think It should be very useful if the documentations are intergrated into the gdns files.

The godot editor treat a NativeScript file as a usual script file now. When we double click to open a .gdns file the script editor is shown without any code. I think this is a good place to display documentations in the gdns files like the Editor Helper does here.

archived feature proposal gdnative

Most helpful comment

I'll probably add an extension to the NativeScript API that adds more parameters to register_method and register_property and also lets you query for classes and methods, properties and signals on those.

A special UI could then display the information about those classes. Maybe an editor plugin could even generate proper documentation in different formats for external tools? Just as an idea.

All 4 comments

Is it technically possible to auto-generate classes and methods when they get registered by the library? (as the engine does). It doesn't give docs, but at least gives a direct (and exact) view of classes and functions available.

I'll probably add an extension to the NativeScript API that adds more parameters to register_method and register_property and also lets you query for classes and methods, properties and signals on those.

A special UI could then display the information about those classes. Maybe an editor plugin could even generate proper documentation in different formats for external tools? Just as an idea.

Could this also be used to check arguments when GDNative functions get called? Currently it seems pretty unsafe to call them from a script and accidentally mistake a type (unsafe as in "silent fail" or "hard crash")

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

Was this page helpful?
0 / 5 - 0 ratings