AutoWiring: Dependency Injection for Unity

AutoWiring is a package that simplifies the process of finding and retrieving components, resources, and streaming assets in Unity. It uses attributes and reflection to automatically search for components, eliminating the need for manual GetComponent() calls. The package is customizable, allowing you to use tags to specify the type of asset to retrieve. It also provides a streamlined boilerplate implementation, making it easy to get started. AutoWiring is ideal for projects that require a high degree of flexibility and customization.

AutoWiring automatically collects the following items:

  • GameObjects
  • Components
  • Resources
  • StreamingAssets

It provides the following attributes:

  • [Find(string name)] for finding GameObjects
  • [GetComponent(Type type)] for finding Components
  • [GetComponentInParent(Type type)] for finding Components in parent GameObjects
  • [GetComponentInChildren(Type type)] for finding Components in child GameObjects
  • [GetComponents(Type type)] for finding multiple Components
  • [GetComponentsInParent(Type type)] for finding multiple Components in parent GameObjects
  • [GetComponentsInChildren(Type type)] for finding multiple Components in child GameObjects
  • [GetResource(string path)] for loading Resources
  • [GetStreamingAsset(string path)] for loading StreamingAssets

Note: The package is customizable, and you can use overloads to specify the search location for Components.

AutoWiring: Dependency Injection for Unity - Asset Store

πŸ€– Chat with AI

AI is typing

Suggested Posts

EasyJection: A Dependency Injection Framework for Unity

EasyJection: A Dependency Injection Framework for Unity Thumbnail

USyrup - Simple Dependency Injection for Unity

USyrup - Simple Dependency Injection for Unity Thumbnail

Easy Auto-Tiling for Unity

Easy Auto-Tiling for Unity Thumbnail

VTS-Sharp: Unity Plugin for VTube Studio

VTS-Sharp: Unity Plugin for VTube Studio Thumbnail

Conversations: A Modern Dialogue System for Unity

Conversations: A Modern Dialogue System for Unity Thumbnail

Mesh Combine Studio 2: Automatic Mesh Combiner for Unity

Mesh Combine Studio 2: Automatic Mesh Combiner for Unity Thumbnail