92503ae8db
The editor no longer needs to create temporary instances to get the default values. The initializer values of the exported properties are still evaluated at runtime. For example, in the following example, `GetInitialValue()` will be called when first looks for default values: ``` [Export] int MyValue = GetInitialValue(); ``` Exporting fields with a non-supported type now results in a compiler error rather than a runtime error when the script is used.
21 lines
436 B
C#
21 lines
436 B
C#
#pragma warning disable CS0169
|
|
|
|
namespace Godot.SourceGenerators.Sample
|
|
{
|
|
partial class Generic<T> : Godot.Object
|
|
{
|
|
private int _field;
|
|
}
|
|
|
|
// Generic again but different generic parameters
|
|
partial class Generic<T, R> : Godot.Object
|
|
{
|
|
private int _field;
|
|
}
|
|
|
|
// Generic again but without generic parameters
|
|
partial class Generic : Godot.Object
|
|
{
|
|
private int _field;
|
|
}
|
|
}
|