If I have a GameObject
with multiple Component
classes attached to it of the same type (let's call this type HingeJoint
for example purposes), which HingeJoint
component will I get if I called the function GetComponent<HingeJoint>()
on my GameObject
?
According to my research, this answer claims Unity will simply return the first match from the array of Component
s--however, the answer is only an educated guess based on the answerer's own game engine design that strives to mimic Unity and not an authoritative source for what Unity actually does.