title: Generic Abstract Method
body: <p>I ran into trouble when trying to create an abstract class and a method in it that was generic in nature.</p>
  
  <pre><code>class GameRoomManager : MonoBehaviour {
      public GameRoom GetSomething(string s){
          //do things here
          return GameRoomvar;
      }
  }
  </code></pre>
  
  <p>Now I have another class that does something similar, but different classes involved</p>
  
  <pre><code>class PlayerManager : MonoBehaviour{
      public Player GetSomething(string s){
          //player related things here
          return Playervar;
      }
  }
  </code></pre>
  
  <p>I want to have both classes GameRoomManager and PlayerManager inherit from an abstract class Abs</p>
  
  <pre><code>class GameRoomManager : Abs{
      public override GameRoom GetSomething&lt;GameRoom&gt;(string s){
          return GameRoomvar;
      }
  }
  </code></pre>
  
  <p>where</p>
  
  <pre><code>public abstract class Abs{
      public T GetSomething&lt;T&gt;(string s);
  }
  </code></pre>
  
  <p>I've seen a few answers on this topic when I was looking for solutions, and all suggested the abstract class itself be generic. I don't want to make the abstract class generic, since examples I saw would have me do <code>class GameRoomManager : Abs&lt;GameRoomManager&gt;</code>. But I want the method to return type GameRoom, not GameRoomManager.</p>
  
  <p>I'm not totally familiar with generics, so please point me in the right direction if I'm going wrong</p>