diff --git a/source/DefaultEcs/Technical/Debug/EntityDebugView.cs b/source/DefaultEcs/Technical/Debug/EntityDebugView.cs index 19872e4d..2fe3f4a8 100644 --- a/source/DefaultEcs/Technical/Debug/EntityDebugView.cs +++ b/source/DefaultEcs/Technical/Debug/EntityDebugView.cs @@ -10,8 +10,9 @@ internal sealed class EntityDebugView [DebuggerDisplay("Component {Type}")] private sealed class Component : IComponent { - public readonly bool IsEnabled; - public readonly T Value; + public bool IsEnabled { get; } + + public T Value { get; } public Type Type => typeof(T); diff --git a/source/DefaultEcs/Technical/Debug/WorldDebugView.cs b/source/DefaultEcs/Technical/Debug/WorldDebugView.cs index e23d0aca..b2082680 100644 --- a/source/DefaultEcs/Technical/Debug/WorldDebugView.cs +++ b/source/DefaultEcs/Technical/Debug/WorldDebugView.cs @@ -20,10 +20,16 @@ private sealed class WorldComponents : IComponent public T[] Components => _world.GetAll().ToArray(); + public bool HasValue { get; } + + public T Value { get; } + public WorldComponents(World world, int maxCapacity) { _world = world; MaxCapacity = maxCapacity; + HasValue = world.Has(); + Value = HasValue ? world.Get() : default; } }