title: C# Unity Engine destroy() subclass
body: <p>Hello i have this code:</p>
  
  <pre><code>public abstract class Test : MonoBehaviour
  {
      public abstract void OnStart();
      public abstract void OnUpdate();
  
      private void Start()
      {
          OnStart();
      }
  
      private void Update()
      {
          if (Input.GetKeyDown(KeyCode.X))
          {
              Destroy(this);
          }
          OnUpdate()
      }
  }
  </code></pre>
  
  <p>then I have the this:</p>
  
  <pre><code>public class SecondTest : Test
  {
      public override void OnStart()
      {
  
      }
  
      public override void OnUpdate()
      {
          Writter.Log("Running");
      }
  }
  </code></pre>
  
  <p>However whenever I press X, my writter keeps logging, it seems like the instance of "Test" gets destroyed but not my "SecondTest" is there any way to solve this? thank you!</p>