Class RuntimeProxyBindingBuilder
- Namespace
- Plugins.Saneject.Runtime.Bindings.RuntimeProxy
- Assembly
- Saneject.Runtime.dll
Builder for configuring runtime proxy resolution strategies.
public class RuntimeProxyBindingBuilder
- Inheritance
-
objectRuntimeProxyBindingBuilder
Constructors
RuntimeProxyBindingBuilder(ComponentBinding)
Initializes a new instance of the RuntimeProxyBindingBuilder class.
public RuntimeProxyBindingBuilder(ComponentBinding binding)
Parameters
bindingComponentBindingThe component binding to configure.
Methods
FromAnywhereInLoadedScenes()
Resolves the target Plugins.Saneject.Runtime.Bindings.Component by finding the first instance of that type in any loaded scene. Includes inactive objects in the search.
public void FromAnywhereInLoadedScenes()
FromComponentOnPrefab(GameObject, bool)
Resolves the proxy by instantiating the specified prefab and getting the target Plugins.Saneject.Runtime.Bindings.Component from it.
public RuntimeProxyInstanceModeBuilder FromComponentOnPrefab(GameObject prefab, bool dontDestroyOnLoad = false)
Parameters
prefabGameObjectThe prefab to instantiate.
dontDestroyOnLoadboolWhether to apply DontDestroyOnLoad to the instantiated object.
Returns
- RuntimeProxyInstanceModeBuilder
A RuntimeProxyInstanceModeBuilder to configure the instance mode.
FromGlobalScope()
Resolves the target Plugins.Saneject.Runtime.Bindings.Component from GlobalScope. The target must already be registered there, usually via a global component binding.
public void FromGlobalScope()
FromNewComponentOnNewGameObject(bool)
Resolves the target Plugins.Saneject.Runtime.Bindings.Component by creating a new UnityEngine.GameObject and adding the Plugins.Saneject.Runtime.Bindings.Component to it.
public RuntimeProxyInstanceModeBuilder FromNewComponentOnNewGameObject(bool dontDestroyOnLoad = false)
Parameters
dontDestroyOnLoadboolWhether to apply DontDestroyOnLoad to the new object.
Returns
- RuntimeProxyInstanceModeBuilder
A RuntimeProxyInstanceModeBuilder to configure the instance mode.