Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.69 KB

configuration.rst

File metadata and controls

53 lines (37 loc) · 1.69 KB

Initial configuration

One of the divergences in API mentioned above relates to static members. The original C# implementation makes heavy use of static variables, but since GDScript doesn't support them, it uses a singleton node called /classes/class_inkruntime instead. This runtime node must be added to the scene tree before executing any of the methods of the GDScript API.

The singleton node is autoconfigured an AutoLoad singleton as long as the editor plugin is enabled.

It's also possible to add res://addons/inkgd/runtime/static/ink_runtime.gd to the AutoLoad list manually if it doesn't appear in the list or was previously removed.

Warning

The singleton must be named "__InkRuntime".

The AutoLoad tab in the project settings.

The AutoLoad tab in the project settings, with the add button emphasized.

The AutoLoad tab with 'runtime.gd' added as a singleton.

When added as an AutoLoad singleton, the node will remain in the scene tree even when the current scene changes.


That's it! You can now start using inkgd in your Godot scripts. From here you can:

  • learn how to add InkPlayer<../advanced/using_inkplayer> to your projets;
  • learn how to use all the features offered by the editor plugin<editor_plugin>.