From 77bfb0a74a6e9b48a47f86090f854ac55f482e8f Mon Sep 17 00:00:00 2001 From: hill Date: Sat, 10 Feb 2024 22:01:34 +0000 Subject: [PATCH] do the formatting thing better? --- .editorconfig | 4 ++-- .../Editor/Scripts/AudioLinkDefineManager.cs | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index c452c07b..c82becfe 100644 --- a/.editorconfig +++ b/.editorconfig @@ -84,8 +84,8 @@ dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case csharp_using_directive_placement = outside_namespace:suggestion dotnet_sort_system_directives_first = true csharp_prefer_braces = true:silent -csharp_preserve_single_line_blocks = true:none -csharp_preserve_single_line_statements = false:none +csharp_preserve_single_line_blocks = false:silent +csharp_preserve_single_line_statements = false:silent csharp_prefer_static_local_function = true:suggestion csharp_prefer_simple_using_statement = false:none csharp_style_prefer_switch_expression = true:suggestion diff --git a/Packages/com.llealloo.audiolink/Editor/Scripts/AudioLinkDefineManager.cs b/Packages/com.llealloo.audiolink/Editor/Scripts/AudioLinkDefineManager.cs index b010d266..3e6b84d4 100644 --- a/Packages/com.llealloo.audiolink/Editor/Scripts/AudioLinkDefineManager.cs +++ b/Packages/com.llealloo.audiolink/Editor/Scripts/AudioLinkDefineManager.cs @@ -18,12 +18,14 @@ private static void AddDefineIfMissing(BuildTargetGroup buildTarget, string newD string existingDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildTarget); HashSet defineSet = new HashSet(); - if (existingDefines.Length > 0) + if (existingDefines.Length > 0) { defineSet = new HashSet(existingDefines.Split(';')); + } - if (defineSet.Add(newDefine)) + if (defineSet.Add(newDefine)) { definesChanged = true; - + } + if (definesChanged) { string finalDefineString = string.Join(";", defineSet.ToArray()); PlayerSettings.SetScriptingDefineSymbolsForGroup(buildTarget, finalDefineString);