Click or drag to resize

ServiceLocatorRegisterLazySingletonForSceneTAbstract, TConcrete Method (Scene)

Registers a scene-specific concrete singleton of the type TConcrete for the abstract type TAbstract. The instance won't be created until the first time it is resolved.

Namespace:  Archon.SwissArmyLib.Utils
Assembly:  Archon.SwissArmyLib (in Archon.SwissArmyLib.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static Lazy<TConcrete> RegisterLazySingletonForScene<TAbstract, TConcrete>(
	Scene scene
)
where TConcrete : new(), TAbstract
Request Example View Source

Parameters

scene
Type: Scene
The scene to register the transient type for.

Type Parameters

TAbstract
The abstract type that will be mapped to TConcrete.
TConcrete
The concrete singleton implementation.

Return Value

Type: LazyTConcrete

[Missing <returns> documentation for "M:Archon.SwissArmyLib.Utils.ServiceLocator.RegisterLazySingletonForScene``2(UnityEngine.SceneManagement.Scene)"]

See Also