adic icon indicating copy to clipboard operation
adic copied to clipboard

Add attribute to automatically get components

Open intentor opened this issue 7 years ago • 0 comments

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.

intentor avatar Apr 18 '17 08:04 intentor