Skip to content

singinwhale/Tentacle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tentacle Logo

Tentacle

Inversion of Control (Dependency Injection) framework for Unreal Engine roughly inspired by Zenject

Examples

Hello World Example

The most basic usage example goes like this:

// Create a simple DI Container
DI::FDiContainer DiContainer = DI::FDiContainer();

// Bind some UObject
const TObjectPtr<USimpleUService> Service = NewObject<USimpleUService>();
DiContainer.Bind().Instance<USimpleUService>(Service);

// Resolve the Object via its type
TObjectPtr<USimpleService> ResolvedService = DiContainer.Resolve().TryGet<USimpleUService>();
check(ResolvedService == Service);

// Or call a function with its arguments populated from the container
DiContainer.Inject().AsyncIntoFunctionByType(*ExampleComponent, &UExampleComponent::InjectDependencies);

For more info see full Readme

About

Inversion of Control (Dependency Injection) framework for Unreal Engine

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors