From 16ac2b518939c2d412f62694ec8993dd8f01c612 Mon Sep 17 00:00:00 2001 From: Nate Hill Date: Wed, 8 Feb 2023 16:47:22 -0600 Subject: [PATCH] Made it so that the scripting symbol for an optional dependency is removed from the project if the optional dependency is removed. --- Editor/ConditionalCompilationUtility.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Editor/ConditionalCompilationUtility.cs b/Editor/ConditionalCompilationUtility.cs index a763cfb..2f81030 100644 --- a/Editor/ConditionalCompilationUtility.cs +++ b/Editor/ConditionalCompilationUtility.cs @@ -186,6 +186,13 @@ static void UpdateDependencies(bool reset = false) } }); + // Remove scripting symbols for optional dependencies that have been removed. + foreach (var define in dependencies.Values) + { + if (projectDefines.Contains(define) && !ccuDefines.Contains(define)) + projectDefines.Remove(define); + } + if (reset) { foreach (var define in dependencies.Values)