We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
なぜか以下のコードがうまく働かないので放置
#if UNITY_2020_2_OR_NEWER #nullable enable #endif
The text was updated successfully, but these errors were encountered:
System.Diagnostics.CodeAnalysis名前空間を使用し、以下のように記述することで、パッケージ側で#nullableを使用せずに、使用側で#nullable enableした際に警告を発することが可能でした。
System.Diagnostics.CodeAnalysis
#nullable
#nullable enable
#if UNITY_2020_2_OR_NEWER using System.Diagnostics.CodeAnalysis; #endif public static class TestExtension { #if UNITY_2020_2_OR_NEWER public static ParticleSystem TestExtensionMethod([DisallowNull]this ParticleSystem particleSystem, int value) #else public static ParticleSystem TestExtensionMethod(this ParticleSystem particleSystem, int value) #endif { Debug.Log(value); return particleSystem; } }
このコードはUnity 2019.4.31f1で問題なくコンパイルされました。
Sorry, something went wrong.
No branches or pull requests
なぜか以下のコードがうまく働かないので放置
#if UNITY_2020_2_OR_NEWER #nullable enable #endif
The text was updated successfully, but these errors were encountered: