Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attribute to automatically get components #84

Open
intentor opened this issue Apr 18, 2017 · 0 comments
Open

Add attribute to automatically get components #84

intentor opened this issue Apr 18, 2017 · 0 comments
Assignees

Comments

@intentor
Copy link
Owner

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 intentor self-assigned this Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant