You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I migrated a project over to 4.4.dev4 when the project was using 4.3.stable. It fail compilation and gave this error:
CS8785: Generator 'ScriptPropertiesGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'InvalidOperationException' with message 'Nullable object must have a value.' CSC(0,0)
I narrowed it down to a single property from a single C# file. It seems the script generator is having trouble with generics in dictionaries. The following code created the failure in compilation:
Unbound generics are not supported in exported properties, this applies to every generic type (like Godot.Collections.Array<T>). However, Godot didn't support type hints for Dictionaries until 4.4 so that's why you are only running into this now. Before 4.4 we were exporting untyped Dictionaries in these cases, but now we try to generate the proper type hints and since the type is unbound we can't.
Tested versions
System information
Godot v4.4.dev4.mono - Windows 10.0.22631 - Multi-window, 1 monitor - Vulkan (Forward+) - integrated Intel(R) Iris(R) Xe Graphics (Intel Corporation; 31.0.101.4314) - 13th Gen Intel(R) Core(TM) i7-1360P (16 threads)
Issue description
I migrated a project over to
4.4.dev4
when the project was using4.3.stable
. It fail compilation and gave this error:I narrowed it down to a single property from a single C# file. It seems the script generator is having trouble with generics in dictionaries. The following code created the failure in compilation:
Steps to reproduce
.cs
fileMinimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: