title: Automatically create a copy of a static variable for each derived class
body: <p>I have a base class with a static variable. I want to create derived subclasses which will automatically have their own unshared static variable. Ideally it would look like this:</p>
  
  <pre><code>class Parent
  {
       Texture2D picture;
       static Texture2D pictureOrigin;
  
       Parent()
       {
           picture = pictureOrigin;
           /*Loading the static origin to an instance variable
           because I might want to have more pictureOrigins 
           and alternate them or perhaps change the picture
           of the instance based on a certain event, etc.*/            
       }
  }
  
  class Subclass1 : Parent
  {
      Subclass1() : base()
      { }
  }
  
  class Subclass2 : Parent
  {
      Subclass2() : base()
      { }
  }
  
  void main()
  {
      Parent.pictureOrigin = Load("pictureForParent"); 
      Subclass1.pictureOrigin = Load("pictureForSubclass1");
      Subclass2.pictureOrigin = Load("pictureForSubclass2");
      //Then creating instances of the classes and drawing them, etc.
  }
  </code></pre>
  
  <p>But what happens is that they all get the last loaded image (pictureForSubclass2) because the static variable <code>pictureOrigin</code> is shared between them. </p>
  
  <p>The quickest fix is manually adding new static variable <code>pictureOrigin</code> to each subclass and hiding the <code>pictureOrigin</code> variable of the base class:</p>
  
  <pre><code>class Subclass1 : Parent
  {
      new static Texture2D pictureOrigin;
  
      Subclass1() : base()
      {
           picture = pictureOrigin;
      }
  }
  </code></pre>
  
  <p>Alternatively, creating abstract methods or similar to ensure the creation of the new static variable in the subclasses. But it seems like too much of a hassle and not too elegant.  Is there a better way of doing this?</p>