using UnityEngine;
namespace InfiniteWorld.VoxelWorld.Contracts
{
///
/// Signals that a chunk now has valid nav geometry and dependent coverage windows should invalidate cached builds.
///
public readonly struct ChunkNavGeometryReadyMessage
{
public ChunkNavGeometryReadyMessage(Vector2Int coord, int version)
{
Coord = coord;
Version = version;
}
///
/// Chunk coordinate whose nav geometry became available.
///
public Vector2Int Coord { get; }
///
/// Version of the chunk runtime state associated with this notification.
///
public int Version { get; }
}
///
/// Signals that a chunk's nav geometry is being removed so dependent coverage windows can drop stale build data.
///
public readonly struct ChunkNavGeometryRemovedMessage
{
public ChunkNavGeometryRemovedMessage(Vector2Int coord, int version)
{
Coord = coord;
Version = version;
}
///
/// Chunk coordinate whose nav geometry is no longer available.
///
public Vector2Int Coord { get; }
///
/// Last known version of the chunk state before removal.
///
public int Version { get; }
}
///
/// Invalidates consumers that cache the current world interest set.
///
public readonly struct WorldInterestChangedMessage
{
public WorldInterestChangedMessage(int version)
{
Version = version;
}
///
/// Monotonic version of the world interest state after the change.
///
public int Version { get; }
}
///
/// Invalidates consumers that cache transient nav coverage hints.
///
public readonly struct NavCoverageHintChangedMessage
{
public NavCoverageHintChangedMessage(int version)
{
Version = version;
}
///
/// Monotonic version of the active nav hint state after the change.
///
public int Version { get; }
}
}