-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Description
Tested versions
Reproducible on 4.3 Beta 2 and 4.3 Beta 3
Not tested on other versions yet
NOTE THIS IS C# SPECIFIC - GDSCRIPT seems to be fine.
System information
Godot v4.3.beta3.mono - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 (NVIDIA; 32.0.15.6070) - AMD Ryzen 9 5950X 16-Core Processor (32 Threads)
Issue description
Tracked this down by use of GD.Prints.
This is in C#. I have Arrays which are marked as "Export" which are filled in with the editor. These work fine in windows and android Builds.
On IOS build, if I build it the built code says the array is of size 0.
Steps to reproduce
In C#. Have an array of any type, which is exported and filled in the editor. For example, the way I found this bug was as follows.
[Export]
public Array<TouchScreenButton> buttons = new Array<TouchScreenButton>();
In the editor, add a couple of buttons to this array.
Then in the C# code, have something like :
GD.Print("Number of Buttons : " + buttons.Count);
When you run the code on Windows/Mac/Android - you'll get a debug log saying "Number of Buttons : 2" (or however many you added).
HOWEVER.. On IOS, you'll get 0.
This will happen with ANY godot type added to array in the editor.
Also happens the exact same with the following code:
[Export]public DrawNode2D[] subDrawNodes2 = null;
Minimal reproduction project (MRP)
EDIT: Added a small repro below.