Skip to content

Add attribute to automatically get components #84

Description

@intentor

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions