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

Support arrays of StringName, NodePath and RID in mono #53576

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

raulsntos
Copy link
Member

@raulsntos raulsntos commented Oct 8, 2021

Fixes #53362
Fixes #50661
Fixes #47621

Since these types don't inherit from Godot.Object they weren't supported in mono_object_to_variant which is used by tool exports.

Copy link
Contributor

@neikeq neikeq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good but this needs to be handled in GDMonoField::set_value_from_variant too:

void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_value) {

Copy link
Contributor

@neikeq neikeq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind. Looks like the array implementation for fields was moved to GDMonoMarshal::variant_to_mono_array which this PR correctly implements.

@akien-mga akien-mga merged commit 4a0a91f into godotengine:master Oct 15, 2021
@akien-mga
Copy link
Member

Thanks!

@raulsntos raulsntos deleted the fix-mono-to-variant-array branch October 15, 2021 15:44
@pranshuthegamer
Copy link

how do i use NodePath arrays in c# then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment