title: Get all components with a specific interface in Unity
body: <p>some <code>GameObjects</code> in my scene implement the interace <code>ISaveable</code>. In my script, I want to find all these interfaces and store them. Later on I can loop through them and call their implemented method <code>SaveData()</code>.</p>
  <p>My current workaround to find these interfaces:</p>
  <pre><code>    List&lt;ISaveable&gt; saveables = new List&lt;ISaveable&gt;();
      MonoBehaviour[] sceneObjects = FindObjectsOfType&lt;MonoBehaviour&gt;();
      
      for (int i = 0; i &lt; sceneObjects.Length; i++)
      {
          MonoBehaviour currentObj = sceneObjects[i];
          ISaveable currentComponent = currentObj.GetComponent&lt;ISaveable&gt;();
  
          if (currentComponent != null)
          {
              saveables.Add(currentComponent);
          }
      }
  </code></pre>
  <p>The code works fine but is there a better way? I don't want to search for each Monobehaviour in the scene and then try to get its interface component.</p>