add dynamic spawning

This commit is contained in:
WillJeynes
2026-08-24 13:53:58 +01:00
parent ae2e8daa6f
commit 641564b461
36 changed files with 1774 additions and 18 deletions
+28
View File
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Utils
{
[Serializable]
public class GameObjectEntry
{
public string key;
public GameObject value;
}
public static class GameObjectEntryListExtensions
{
public static GameObject ByKey(this List<GameObjectEntry> entries, string key)
{
foreach (var entry in entries)
{
if (entry.key == key)
return entry.value;
}
return null;
}
}
}