-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
C# Exported Array<Node> is null #97190
Comments
This will not work, if you are unable to reproduce this in a new project an MRP is going to be necessary, so please try to create one, or this won't be possible to test |
Hi @AThousandShips, While stripping it down and, I realized that there are multiple scenarios, which all behave different:
So, I would sum it up as: I hope this helps, please find the MRP attached: |
That should hopefully help! Thank you! Can't test C# projects myself at the moment but I'm sure someone will take a look |
Tested versions
4.3 stable
System information
Godot v4.3.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1070 Ti (NVIDIA; 31.0.15.3623) - AMD Ryzen 7 2700X Eight-Core Processor (16 Threads)
Issue description
I have a larger project, that uses C# for all the scripts. Everything works fine when I start the game from the editor. When I export it, I get several errors, that I was able to trace back to that an exported variable is null, instead of being set to the value that is stored in the scene.
This applies to exported variables, that are made of a Godot.Collections.Array, where can be Node or any other Script that inherits from Node.
If I replace the Array with Node[], the export is working fine.
Steps to reproduce
Unfortunately, I was not able to create a MRP, as the issue did not persist in a minimal project. So unfortunately, I do not know how to reproduce, but I can share the code with one or two people who want to investigate the issue.
Minimal reproduction project (MRP)
I was not able to create a MRP and don't want to publically share my project, but I can share the code with one or two persons who want to investigate the issue.
The text was updated successfully, but these errors were encountered: