Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Simple Dependency Injection

An asset by comfygrapes
The page banner background of a mountain and forest
Simple Dependency Injection hero image

Quick Information

0 ratings
Simple Dependency Injection icon image
comfygrapes
Simple Dependency Injection

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.

Supported Engine Version
4.4
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
5 days ago
Git URL
Issue URL

dependency-injection-system

A simple DI implementation for Godot 4 made with GDScript.

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.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Simple Dependency Injection icon image
comfygrapes
Simple Dependency Injection

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.

Supported Engine Version
4.4
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
5 days ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers