Park/Buildings/Building.Prefab.cs
namespace HC3;
public partial class Building : ISceneMetadata
{
/// <summary>
/// Get a list of uninstantiated building prefab files
/// </summary>
public static IEnumerable<GameObject> AllPrefabs
{
get
{
return ResourceLibrary.GetAll<PrefabFile>()
.Where( x => x.GetMetadata( "Type", "" ).Equals( "Building" ) )
.ToList()
.Select( x => GameObject.GetPrefab( x.ResourcePath ) );
}
}
Dictionary<string, string> ISceneMetadata.GetMetadata()
{
return new()
{
{ "Type", "Building" }
};
}
}