Allow ui elements to be automatically retrieved at awake/start or anywhere at anytime by using attributes.
Example:
[View("MyViewId")]
public class MyView : MonoBehaviour
{
[Query("MainModal")]
public VisualElement MainModal;
[Query<Button>()]
public List<Button> Buttons;
[Query(".unity-label")]
public Label[] Labels;
[Query<ScrollView>("TimelineScroll")]
private ScrollView _scrollView;
public void OnEnable() => View.ExecuteQueries(this);
}
Allow ui elements to be automatically retrieved at awake/start or anywhere at anytime by using attributes.
Example: