diff --git a/src/System.cs b/src/System.cs index 3b34cbe..6d16695 100644 --- a/src/System.cs +++ b/src/System.cs @@ -116,6 +116,8 @@ internal Scheduler AddSystemParam(T param) where T : ISystemParam return this; } + + internal bool ResourceExists() => _resources.ContainsKey(typeof(T)); } public interface IPlugin @@ -232,9 +234,10 @@ void ISystemParam.New(object arguments) } public void AddResource(T resource) - { - _scheduler?.AddResource(resource); - } + => _scheduler?.AddResource(resource); + + public bool ResourceExists() + => _scheduler.ResourceExists(); } public sealed class Res : ISystemParam