#if DEBUG using System; using System.Collections.Generic; namespace Encompass { public abstract class DebugRenderer : Renderer { protected IEnumerable Debug_GetAllComponents(Entity entity) { return _componentManager.Debug_Components(entity.ID); } protected IEnumerable Debug_Entities(Type componentType) { var method = typeof(Renderer).GetMethod(nameof(ReadEntitiesAsEnumerable), System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); var generic = method.MakeGenericMethod(componentType); return (IEnumerable)generic.Invoke(this, null); } protected IEnumerable Debug_SearchComponentType(string typeString) { return _componentManager.Debug_SearchComponentType(typeString); } protected void Debug_SetComponent(in Entity entity, in TComponent component) where TComponent : struct { _componentManager.Debug_UpdateComponent(entity.ID, component); } } } #endif