Table of Contents

Class RuntimeProxyBindingBuilder

Namespace
Plugins.Saneject.Runtime.Bindings.RuntimeProxy
Assembly
Saneject.Runtime.dll

Builder for configuring runtime proxy resolution strategies.

public class RuntimeProxyBindingBuilder
Inheritance
object
RuntimeProxyBindingBuilder

Constructors

RuntimeProxyBindingBuilder(ComponentBinding)

Initializes a new instance of the RuntimeProxyBindingBuilder class.

public RuntimeProxyBindingBuilder(ComponentBinding binding)

Parameters

binding ComponentBinding

The 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

prefab GameObject

The prefab to instantiate.

dontDestroyOnLoad bool

Whether 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

dontDestroyOnLoad bool

Whether to apply DontDestroyOnLoad to the new object.

Returns

RuntimeProxyInstanceModeBuilder

A RuntimeProxyInstanceModeBuilder to configure the instance mode.