From 7914292d53129abdb49f9cc5506beba4068fbaa1 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Thu, 20 Jul 2023 15:55:11 -0700 Subject: [PATCH] dont do ??= on UnityEngine.Object --- NewHorizons/Builder/Props/DetailBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 1c2f667d..1dca9882 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -70,7 +70,7 @@ namespace NewHorizons.Builder.Props /// public static GameObject Make(GameObject planetGO, Sector sector, DetailInfo info) { - _emptyPrefab ??= new GameObject("Empty"); + if (_emptyPrefab == null) _emptyPrefab = new GameObject("Empty"); // Allow for empty game objects so you can set up conditional activation on them and parent other props to them var prefab = string.IsNullOrEmpty(info.path) ? _emptyPrefab : SearchUtilities.Find(info.path);