From 908ddeb8629ad9885284960e8030a3bedcf088cd Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Fri, 16 Jan 2026 18:02:53 +0200 Subject: [PATCH] editorconfig: do not suggest null propagation for Unity code --- .editorconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.editorconfig b/.editorconfig index 3764c8c..998c1ba 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,3 +6,10 @@ csharp_style_prefer_primary_constructors = false # IDE0305: Simplify collection initialization dotnet_style_prefer_collection_expression = never + +# IDE0031: Use null propagation +# Unity overrides equality operator, so gameObject == null also accounts for internal state of the backing C++ object +# Read more: +# - https://blog.lslabs.dev/posts/null_check_equality_unity +# - https://blog.lslabs.dev/posts/unity_script_duality +dotnet_style_null_propagation = false