diff --git a/tutorials/plugins/gdnative/gdnative-c-example.rst b/tutorials/plugins/gdnative/gdnative-c-example.rst index 500552f43..6cf8c90c8 100644 --- a/tutorials/plugins/gdnative/gdnative-c-example.rst +++ b/tutorials/plugins/gdnative/gdnative-c-example.rst @@ -228,7 +228,7 @@ library and communicates back to the engine what objects we make available. godot_instance_destroy_func destroy = { NULL, NULL, NULL }; destroy.destroy_func = &simple_destructor; - nativescript_api->godot_nativescript_register_class(p_handle, "Simple", "Reference", + nativescript_api->godot_nativescript_register_class(p_handle, "SIMPLE", "Reference", create, destroy); godot_instance_method get_data = { NULL, NULL, NULL }; @@ -236,7 +236,7 @@ library and communicates back to the engine what objects we make available. godot_method_attributes attributes = { GODOT_METHOD_RPC_MODE_DISABLED }; - nativescript_api->godot_nativescript_register_method(p_handle, "Simple", "get_data", + nativescript_api->godot_nativescript_register_method(p_handle, "SIMPLE", "get_data", attributes, get_data); } @@ -495,7 +495,7 @@ Creating the NativeScript (``.gdns``) file ------------------------------------------ With our ``.gdnlib`` file we've told Godot how to load our library, now we need -to tell it about our "Simple" object class. We do this by creating a +to tell it about our "SIMPLE" object class. We do this by creating a :ref:`NativeScript ` resource file with ``.gdns`` extension. Like done for the GDNativeLibrary resource, click the button to create a new @@ -504,7 +504,7 @@ resource in the Inspector and select ``NativeScript``: .. image:: img/nativescript_resource.png The inspector will show a few properties that we need to fill. As *Class Name* -we enter "Simple" which is the object class name that we declared in our C +we enter "SIMPLE" which is the object class name that we declared in our C source when calling ``godot_nativescript_register_class``. We also need to select our ``.gdnlib`` file by clicking on *Library* and selecting *Load*: diff --git a/tutorials/plugins/gdnative/img/nativescript_library.png b/tutorials/plugins/gdnative/img/nativescript_library.png index b46e930da..dce48b015 100644 Binary files a/tutorials/plugins/gdnative/img/nativescript_library.png and b/tutorials/plugins/gdnative/img/nativescript_library.png differ