Open lph993 opened 2 years ago
The function '_init()' in question 2 belongs to the gdnative script.
It seems to me both things are unsupported in Godot 3.x's GDNative, at least in C++ bindings. I think there were existing issues about declaring default values and passing arguments to constructors.
There are two questions I would like to ask:
When the gdnative script function parameters have default values, the functions that gdscript calls it must all be assigned values, otherwise the game will exit after running the godot game timeout, and there will be no error message.
In gdscript, such as: 'var class=preload("res://**").new()', if the 'new()' function has a value such as 'new(self)', it will prompt an error, The '_init()' parameter is zero.
How should I solve the above two problems. --This article comes from network translation