Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom reference class instantiation from within other GDNative classs stopped working #274

Open
xDGameStudios opened this issue Apr 17, 2019 · 1 comment

Comments

@xDGameStudios
Copy link

xDGameStudios commented Apr 17, 2019

This is related to #253!
It used to be possible to instantiate a Reference in the GDNative side using:

return Ref<B>::__internal_constructor(B::_new())

now this doesn't working anymore (it compiles) but crashes when running in Godot 3.1 stable.

@karroffel (I talked with you about this some time ago.. and it was you that said to use this "snippet".. what do you suggest as alternative now?)

@follower
Copy link

As of ~ 9eceb16 the __internal_constructor() workaround should no longer be necessary and use of it may lead to crash, this should now work correctly:

  • Ref<CustomClass> ref = Ref<CustomClass>(custom_class_instance);

See #417 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants