yowchap / ModThatIsNotMod-Public

https://boneworks.thunderstore.io/package/gnonme/ModThatIsNotMod/
2 stars 5 forks source link

Nullables Fix #1

Closed WNP78 closed 2 years ago

WNP78 commented 2 years ago

Hi mr chap chap

Here have code that fixes the nullables Just put using ModThatIsNotMod.Nullables; at the top of your script and you will get extension methods for things that use nullables, allowing you to call them without issue, simply passing in a C# nullable.

There is also the static: NullableMethodExtensions.AudioPlayer_PlayAtPoint which has 2 overloads.

If you want to create your own nullables for other purposes, just use BoxedNullable<T>. This can implicitly convert to an Il2CppSystem.Nullable for use in methods.

-wnp