0 votes

In GDScript and C# I used to create a custom, public "init" method where I put all the arguments needed to replace a node's initial attributes values, in order to directly initialize nodes after instancing them as a scene.

This trick seems to be not working in C++/GDNative, everytime a method goes to replace an attribute's value with one provided in its arguments after a node got instanced, the game crashes.

void Rocket2D::init(Vector2 _direction) {
    direction = _direction;

This method is an example.

Console reports the following error.

ERROR: _get_socket_error: Socket error: 10054
   At: drivers/unix/net_socket_posix.cpp:190

Thank you for your support.

in Engine by (20 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmas[email protected] with your username.