Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | goldenbandit |
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.