title: Unity delete object if it hits NOTHING
body: <p>I'm creating a roguelike game and I need to delete a wall right after it's spawning, but only if it's not colliding with objects tagged <strong>Wall+Ground</strong>. I tried the function OnTriggerEnter2D or OnColliderEnter2D, but those only work if the wall is colliding with anything before it continues to touch nothing.
  This is the code I tried to adjust, but I don't know a function I could use:</p>
  <pre><code>public class BlockWall_Destroyer : MonoBehaviour
  {
      void OnTriggerEnter2D(Collider2D other)
      {
          if (other.gameObject.tag != &quot;Wall+Ground&quot; | other.gameObject.tag != &quot;Player&quot;)
          {
              Destroy(gameObject);
          }
      }
  }
  </code></pre>