I have the same element multiple times. The parent is different. In my case I have 3 different parents (Top_1, Top_2, Top_3) every one of these has a Label element (Content), which has the same styles and name.
I tried something like this, but nothing works:
UnityEngine.UIElements.Label offenseTxt =
statsObjectC.Q<UnityEngine.UIElements.Label>("Top_1 Content");
UnityEngine.UIElements.Label offenseTxt =
statsObjectC.Q<UnityEngine.UIElements.Label>("Top_1 > Content");
Is there a way to do it or do I have to give every element a unique name and query it this way?