Files
Nerfed/Nerfed.Runtime/Scene/Streaming/StreamingComponents.cs
T
max fec2cd8d24 testing building some core systems
- serialization
- chunks
- parralelfor test
2026-04-24 19:21:03 +02:00

29 lines
800 B
C#

using MoonTools.ECS;
using System.Numerics;
namespace Nerfed.Runtime.Scene.Streaming;
/// <summary>
/// Marks an entity as a streaming observer (e.g. the player camera) that causes chunks
/// to be loaded around it.
/// </summary>
public struct ChunkObserverComponent
{
public float ViewRadius;
}
/// <summary>
/// Tags an entity as belonging to a specific chunk, allowing it to be unloaded when the chunk is out of range.
/// </summary>
public struct ChunkMemberComponent
{
// A 64-bit spatial hash combining the X, Y, and Z coordinates.
public long ChunkId;
}
/// <summary>
/// Added to entities that belong to a chunk that has been unloaded.
/// A dedicated system will process and destroy these slowly over multiple frames.
/// </summary>
public struct ChunkUnloadPendingTag { }