Skip to main content

GameObjectLifetimeScope

A class in Alta.LifetimeScopes, Alta.ATT.LifetimeScopes.

VContainer scope on a single game object. With autoInjectSelf on, the object it sits on gets its dependencies injected from the parent scope.

Constructors​

MemberWhat it is
GameObjectLifetimeScope()Creates a GameObjectLifetimeScope with default values.

Fields​

2 private and internal fields
MemberWhat it is
private bool autoInjectSelfIf true, this game object is injected when the scope builds.
private static readonly Logger loggerNLog logger for this class.

Methods​

MemberWhat it is
protected override void ConfigureScope(IContainerBuilder builder)If autoInjectSelf is on, adds this game object to the auto-inject list; warns if there is no parent scope.
1 private and internal method
MemberWhat it is
private void OnValidate()Editor: removes this game object from the serialized auto-inject list, since it is added at runtime.