fix ??= guy (#657)

doesnt work on unity objects lol
This commit is contained in:
Nick 2023-07-20 19:08:14 -04:00 committed by GitHub
commit 212e16b5f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ namespace NewHorizons.Builder.Props
/// </summary>
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);