From 51c49cfac91ed73a3a67a70917ac6441e25abf27 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Mon, 25 Jul 2022 13:18:53 +0200 Subject: [PATCH] Add `UseCSharp` to engine config and fix parsing cmd line options list --- Flax.flaxproj | 1 + Source/Tools/Flax.Build/CommandLine.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Flax.flaxproj b/Flax.flaxproj index 3768b6470..ae03ab860 100644 --- a/Flax.flaxproj +++ b/Flax.flaxproj @@ -10,6 +10,7 @@ "GameTarget": "FlaxGame", "EditorTarget": "FlaxEditor", "Configuration": { + "UseCSharp": true, "UseLargeWorlds": false } } \ No newline at end of file diff --git a/Source/Tools/Flax.Build/CommandLine.cs b/Source/Tools/Flax.Build/CommandLine.cs index 814d302e3..001622d3c 100644 --- a/Source/Tools/Flax.Build/CommandLine.cs +++ b/Source/Tools/Flax.Build/CommandLine.cs @@ -216,7 +216,7 @@ namespace Flax.Build int i = 0; foreach (var e in configuration) { - options[i] = new Option + options[i++] = new Option { Name = e.Key, Value = e.Value, @@ -410,7 +410,7 @@ namespace Flax.Build { // Get option from command line var member = e.Value; - var option = options.FirstOrDefault(x => string.Equals(x.Name, e.Key.Name, StringComparison.OrdinalIgnoreCase)); + var option = options.FirstOrDefault(x => x != null && string.Equals(x.Name, e.Key.Name, StringComparison.OrdinalIgnoreCase)); if (option == null) continue;