Files
Project-M/Assets/_Project/Scripts/Simulation/HomeBase/StorageSpawner.cs
T
2026-06-02 18:28:23 -07:00

21 lines
781 B
C#

using Unity.Entities;
using Unity.Mathematics;
namespace ProjectM.Simulation
{
/// <summary>
/// Singleton baked into the gameplay subscene, holding the baked storage-container ghost prefab and
/// the base-grid cell to spawn it at. A one-shot server system instantiates the prefab at
/// BaseGridMath.CellToWorld(anchor, Cell) and then destroys this singleton. Mirrors the
/// UpgradePickupSpawner / PlayerSpawner pattern.
/// </summary>
public struct StorageSpawner : IComponentData
{
/// <summary>Baked storage-container ghost prefab to instantiate.</summary>
public Entity Prefab;
/// <summary>Base-grid cell at which to place the container (cell center, on the base plane).</summary>
public int2 Cell;
}
}