HUD and Height Changes

This commit is contained in:
2026-06-07 22:29:25 -07:00
parent 4ebaba9933
commit 1ed2aa46c5
41 changed files with 24787 additions and 766 deletions
@@ -0,0 +1,30 @@
using ProjectM.Simulation;
using Unity.Entities;
using UnityEngine;
namespace ProjectM.Authoring
{
/// <summary>
/// Drop one instance into the Gameplay subscene. Bakes <see cref="WorldCollisionConfig"/> capturing the
/// "Environment" physics layer's BelongsTo mask (the layer the boundary-ring + landmark colliders live on).
/// The baker runs on the main thread, so the managed <see cref="LayerMask.NameToLayer"/> lookup is fine here —
/// this exists precisely so the Bursted server EnemyAISystem can read the mask as a plain uint at runtime.
/// </summary>
[DisallowMultipleComponent]
public class WorldCollisionAuthoring : MonoBehaviour
{
[Tooltip("Name of the Unity layer carrying the static world colliders (boundary ring + landmarks).")]
public string EnvironmentLayerName = "Environment";
private class WorldCollisionBaker : Baker<WorldCollisionAuthoring>
{
public override void Bake(WorldCollisionAuthoring authoring)
{
int layer = LayerMask.NameToLayer(authoring.EnvironmentLayerName);
uint mask = layer >= 0 ? 1u << layer : 0u;
var entity = GetEntity(TransformUsageFlags.None);
AddComponent(entity, new WorldCollisionConfig { EnvironmentMask = mask });
}
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ab1c895817ca4b64db74215f13abb5e3