---
title: "k.DlContainer2 - s&box library"
description: "register data & locate it"
canonical: "https://sbox.watch/libraries/kfe/kdlcontainer2/"
generated_at: "2026-07-23T00:09:23.623Z"
---

# k.DlContainer2

register data & locate it

- Type: library
- Ident: kfe.kdlcontainer2
- Creator: k0fe
- Canonical: https://sbox.watch/libraries/kfe/kdlcontainer2/
- Markdown: https://sbox.watch/libraries/kfe/kdlcontainer2.md
- sbox.game: https://sbox.game/kfe/kdlcontainer2/
- Generated: 2026-07-23T00:09:23.623Z

## Stats

- 24h momentum: +0
- Terry score: --
- Favorites: 0
- Upvotes: 0
- Downvotes: 0
- Updated: Jun 8, 2025
- Created: Apr 17, 2025
- Size: 3.0 KB
- Files: 5
- Tags: dependency, di, injection, locator

## Description

DlContainer - Dependency Locator Container (2 cuz first package died for some reason lol)

Quick usage example

Register dependencies
protected override void OnAwake()
{
 base.OnAwake();
 var container = new DlContainer()
 .Register<TestStorage>();

 foreach ( var resource in \_resources )
 {
 container.Register( resource );
 }

 AddFeature( new MyClass( container ) );
}
Resolve dependencies
public class MyClass()
{
 private TestStorage \_testStorage;
 private MyGameResource \_myGameResource;

 public MyClass(DlContainer container)
 {
 \_testStorage = container.Get<TestStorage>();
 \_myGameResource = container.Get<MyGameResource>();
 }
}

It's not perfect, not nearly there even. But it's just easier to resolve dependencies in my ECS framework so f it



## More by k0fe

| Package | Ident | Players | Favorites | Upvotes | Score | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| k.ECS | kfe.kecs | 0 | 2 | 3 | 53% | https://sbox.watch/libraries/kfe/kecs.md |
| k.Cameras | kfe.kcameras | 0 | 1 | 0 | -- | https://sbox.watch/libraries/kfe/kcameras.md |
| k.Constraints | kfe.kconstraints | 0 | 1 | 0 | -- | https://sbox.watch/libraries/kfe/kconstraints.md |
| k.Clothing | kfe.kclothing | 0 | 0 | 0 | -- | https://sbox.watch/libraries/kfe/kclothing.md |
| k.Extensions | kfe.kextensions | 0 | 0 | 0 | -- | https://sbox.watch/libraries/kfe/kextensions.md |
| k.Randomizers | kfe.krandomizers | 0 | 0 | 0 | -- | https://sbox.watch/libraries/kfe/krandomizers.md |
