Skip to content

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

Open

Description

@xDGameStudios

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?)

Activity

  1. follower commented on Jun 22, 2020

    @follower

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions