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.





