adic
adic copied to clipboard
Add attribute to automatically get components
To make component getting on behaviours even simpler, a attribute could be added that would allow Adic to get that component when the GameObject is injected:
public class SomeBehaviour : MonoBehaviour {
[GetComponent]
private Transform someTransform;
}
The problem with this approach is that caching of that information on the type is important, but given the core framework is decoupled from Unity, it would introduce some mix of responsibilities that should be better analyzed.