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.

asked Jul 24, 2019 in Engine by goldenbandit (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 How to use this Q&A? before posting your first questions.