31 / GodotOnReady

A C# Source Generator that adds convenient onready-like features to your C# scripts in Godot Mono (3.x) without any reflection.
https://www.nuget.org/packages/GodotOnReady
MIT License
123 stars 13 forks source link

Support nullable context by disabling nullable context #36

Closed 31 closed 2 years ago

31 commented 2 years ago

Quick fix for nullable reference warnings/errors in the generated code. When NRT is enabled (csc.Options.NullableContextOptions != NullableContextOptions.Disable), add #nullable disable to the top of every generated file.

This is easier to code than passing some extra context object into every *Addition object and inserting ? into the right places. 😄 People probably don't care about accessing the *Path properties from nullable-enabled code, so the slight different that could make doesn't seem worth the effort.