Edit of asset "Simple Dependency Injection" Accepted

Old/Current New/Edit
Title Simple Dependency Injection
Description Easily add Dependency Injection into your project.

When the plugin is enabled, it will automatically create the necessary nodes in your current scene (preferably your Main). Simply move both nodes to the top of your scene tree (if not already) then add your node dependencies to the array in the [DependencyRegistrar] node and the [DependencyProvider] node will do the rest!

To allow dependency injection to happen in any script attached to a node in the scene tree, simply create either an _inject function or a _post_inject function, or both! But do keep in mind that these are only called after _ready.

This tool is useful in cases where:
1. You do not have direct access (via @export) to the nodes you need in a script and do not wish to create a global singleton via autoload.
2. You want a form of dependency inversion and wish to rely on abstractions to interact with other parts of your code.
3. The nodes you need have their own in-scene dependencies that they need to have direct access (via @export) to.
Easily add Dependency Injection to your project.

With the plugin enabled, simply create a [DependencyProvider] node in your Main scene and assign your dependencies, then in any sub scene, so long as it is in the scene tree and has any node that has a script with an '_inject' function, add a [DependencyInjectionRequester] node.

This tool is useful in cases where:
1. You do not have direct access (via @export) to the nodes you need in a script and do not wish to create a global autoload.
2. You want to rely on abstractions to interact with other parts of your code.
3. The nodes you need have their own in-scene dependencies they need to have direct access (via @export) to.
Category Tools
License MIT
Repository Provider GitHub
Repository Url https://github.com/why-not-games-studio/dependency-injection-system
Issues Url https://github.com/why-not-games-studio/dependency-injection-system/issues
Godot version Godot 4.4 Godot 4.4
Version String 1.0.2 1.0.1
Download Commit 7dbc2e3caddd5b4ddee92c33367f227fbaa81665 57829d296f0ad1cda3093b597142d54d268f23fe
Download Url (Computed) https://github.com/why-not-games-studio/dependency-injection-system/archive/7dbc2e3caddd5b4ddee92c33367f227fbaa81665.zip https://github.com/why-not-games-studio/dependency-injection-system/archive/57829d296f0ad1cda3093b597142d54d268f23fe.zip
Icon Url https://raw.githubusercontent.com/why-not-games-studio/dependency-injection-system/origin/master/simple_dependency_injection_logo.png