Method InjectFunctionalityIfNeeded
InjectFunctionalityIfNeeded<TProvider>(IFunctionalitySubscriber<TProvider>)
Check whether this subscriber is a MonoBehaviour and has an invalid provider, in this case a functionality
injection is performed starting from the root transform.
Useful for MonoBehaviour
s that implement an IFunctionalitySubscriber
and are instantiated at
runtime.
Declaration
public static void InjectFunctionalityIfNeeded<TProvider>(this IFunctionalitySubscriber<TProvider> subscriber) where TProvider : class, IFunctionalityProvider
Parameters
Type | Name | Description |
---|---|---|
IFunctionalitySubscriber<TProvider> | subscriber | The functionality subscriber on which to check for a provider |
Type Parameters
Name | Description |
---|---|
TProvider | The provider type for which to check |