public void CreateReceiver(MonoBehaviour target, ReceiverBuilder receivers) { var provider = ReceiverComponentBuilder.FindProvider(target, type, ReceiverComponentBuilder.TypeProvider); if (provider != null) { DelegateReceiverCreator.Create(provider, this, target, receivers); } else { Debug.LogError($"Unable to find {nameof(Provider)}<{type.GetFriendlyName()}> for {target.GetType().Name} named '{target.name}'", target); } }
public static void Create(Provider provider, ReceiverCreator receiverCreator, object target, ReceiverBuilder receivers) { var delegateProvider = new DelegateReceiverCreator(receiverCreator, target, receivers); provider.Register(delegateProvider); }