title: Show variable herited from interface on Unity inspector
body: <p>I want to create some game in Unity and I've started by creating a class hierarchy in order to be able to use polymorphism. So I've created some interfaces with both methods and also variables.</p>
  
  <p>As said in the <a href="https://msdn.microsoft.com/en-us/library/ms173156.aspx" rel="nofollow">C# interfaces documentation</a>, I've created my interface with variables like this</p>
  
  <pre><code>public interface IUnit : ISelectable {
    int   healthPoint { get; set; }
    bool  isIndestructible { get; set; }
    /******************************/
    void  takeDamage(int dmg);
    void  die();
  }
  </code></pre>
  
  <p>Now, I'm implementing my interface in a class:</p>
  
  <pre><code>[System.Serializable]
  public class BasicUnit : MonoBehaviour, IUnit {
  
    private int       _healthPoint;
    public int        HealthPoint         { get { return (_healthPoint); } set { _healthPoint = value; } }
    private bool      _isIndestructible;
    public bool       isIndestructible    { get { return (_isIndestructible); } set { _isIndestructible = value; } }
  
    public void   takeDamage (int dmg)
    {
        if (this.isIndestructible == false) {
            this.HealthPoint -= dmg;
            if (this.HealthPoint &lt;= 0) {
                die();
            }
        }
    }
  
    public void die()
    {
        Destroy(gameObject);
    }
  }
  </code></pre>
  
  <p>My problem is that my variables, <code>healthPoint</code> and <code>isIndestructible</code> are not shown in Unity's inspector despite being public variables. I've tried using <code>[System.Serializable]</code> but it doesn't work.</p>
  
  <p>Well my question is quite simple, <strong>how should I do to show my inherited variables in Unity's inspector ?</strong></p>
  
  <p>Note: I'm trying to have nice and readable code, so if possible I would like to keep my IUnit class as an interface and my variables inside my IUnit.</p>