private void OnDestroy() { if (mapEditor != null && usingPosition != null) { //Tell the tiles we are on that we have been destroyed mapEditor.ClearTile(position); mapEditor.ClearTiles(usingPosition); } }