gg-yb

Results 12 comments of gg-yb

Regarding what the right thing to do is, I think exporting `Array` is inherently dangerous when Godot allows inserting null values in all cases. If we cannot stop Godot from...

While there likely is no use in having null elements in an Array that cannot represent them, I think silently dropping those elements (and thus changing contents, and array length)...

I ran the following code: ![Screenshot_2023-05-25_08-08-14](https://github.com/godot-rust/gdext/assets/76439353/de6e7974-dfe9-4cf4-ad29-c7110f67ad56) Via the editor I pre-filled "foo" with 1, 2; and "bar" with a texture. Then I added another element in both arrays and did...

Is it possible for us to raise an error (one that does not crash the editor) when we get `null` for a `Gd` in an array (TODO: does it happen...

> > Is it possible for us to raise an error (one that does not crash the editor) when we get `null` for a `Gd` in an array (TODO: does...

Upon further inspection, the behavior for no prefix at all comes from here: https://github.com/godot-rust/gdext/blob/3ab6b2ae32b090c004586dd19dd2918d8546cdf7/godot-core/src/builtin/array.rs#L665 Even then, gdscript behavior implies that simply prefixing with VariantType::Array is not the solution here.

Wouldn't that be the wrong type string if I use `T` without an array?

So I figured out a way to get my enum work both as ```rs #[export] foo: Foo, ``` and ```rs #[export] foo: Array, ``` The trick seems to be to...

Demo code can be found here: https://github.com/gg-yb/gdext/commit/6192ac2af6507deedb113eeeb2e36273532804de

> Has this issue been fixed in 4.0 and 4.1 (beta 2 right now)? I can still reproduce the issue in 4.1.1