title: How does Unity decide which Component to return when calling GetComponent<T> on a GameObject with multiple components of type T?
body: <p>If I have a <code>GameObject</code> with multiple <code>Component</code> classes attached to it of the same type (let's call this type <code>HingeJoint</code> for example purposes), which <code>HingeJoint</code> component will I get if I called the function <code>GetComponent&lt;HingeJoint&gt;()</code> on my <code>GameObject</code>?</p>
  
  <p>According to my research, <a href="https://stackoverflow.com/a/48152454/663341">this answer</a> claims Unity will simply return the first match from the array of <code>Component</code>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.</p>