add documentation

This commit is contained in:
Alexander Borisov
2026-04-08 20:58:30 +03:00
parent 31826bd4e0
commit 1681e44c5e
11 changed files with 240 additions and 0 deletions
@@ -5,6 +5,9 @@ using UnityEngine;
namespace VoxelWorldScene
{
/// <summary>
/// Combines the world generator's current stream target with scene spawn anchors into one interest feed for nav coverage.
/// </summary>
public sealed class SceneWorldInterestReader : IWorldInterestReader
{
private readonly VoxelWorldGenerator worldGenerator;
@@ -16,8 +19,14 @@ namespace VoxelWorldScene
this.worldGenerator = worldGenerator;
}
/// <summary>
/// Mirrors the generator's interest version so downstream systems can invalidate cached plans when scene interest changes.
/// </summary>
public int InterestVersion => worldGenerator != null ? worldGenerator.InterestVersion : 0;
/// <summary>
/// Appends both dynamic actor interest and static spawn-anchor interest into the supplied list.
/// </summary>
public void GetInterestPoints(List<WorldInterestPoint> results)
{
if (results == null)
@@ -10,6 +10,9 @@ namespace VoxelWorldScene
{
[DisallowMultipleComponent]
[RequireComponent(typeof(VoxelWorldGenerator))]
/// <summary>
/// Scene-level composition root that wires the voxel world, nav coverage services and interest readers into one runtime module.
/// </summary>
public sealed class VoxelWorldNavMeshLifetimeScope : LifetimeScope
{
[SerializeField] private bool enableRuntimeNavMesh = true;
@@ -6,6 +6,9 @@ namespace VoxelWorldScene
{
[DisallowMultipleComponent]
[RequireComponent(typeof(VoxelWorldGenerator))]
/// <summary>
/// Keeps the voxel world streaming target aligned with the local player when available, or a spawn anchor as a safe fallback.
/// </summary>
public sealed class VoxelWorldPlayerStreamTargetBinding : MonoBehaviour
{
[SerializeField] private VoxelWorldGenerator worldGenerator;
@@ -3,10 +3,16 @@ using UnityEngine;
namespace VoxelWorldScene
{
[DisallowMultipleComponent]
/// <summary>
/// Marks a scene transform that should contribute interest before players move so spawn areas can be prewarmed for nav coverage.
/// </summary>
public sealed class VoxelWorldSpawnAnchor : MonoBehaviour
{
[SerializeField, Min(0.01f)] private float priority = 2f;
/// <summary>
/// Relative importance of this anchor when coverage planning competes between multiple spawn-related interests.
/// </summary>
public float Priority => priority;
}
}