Unrelated: it seems like `?` in parameter types does not work.
public partial class Item : MarginContainer
{
[OnInstantiate]
private void Init(int? units) { }
}
This gives:
CSC : warning CS8785: Generator 'OnInstantiateSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'Item.Init(int?).g.cs' contains an invalid character '?' at position 30. (Parameter 'hintName')'
Interestingly, using Nullable<int> does not work either.
This gives:
Interestingly, using
Nullable<int>
does not work either.Originally posted by @ttencate in https://github.com/Cat-Lips/GodotSharp.SourceGenerators/issues/26#issuecomment-1606069923