unity飞机大战陨石不能正常爆炸

问题遇到的现象和发生背景

unity陨石不能正常爆炸

用代码块功能插入代码,请勿粘贴截图

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DestroyByContact : MonoBehaviour {
public GameObject explosion;//星星爆炸特效
public GameObject playerExplosion;//飞船爆炸特效

// Use this for initialization
void Start () {
    
}

// Update is called once per frame
void Update () {

    
}
 void OnTriggerEnter(Collider other)
{
    if (other.tag == "Boundary" || other.tag == "EnemBolt") return;
        return;
    Instantiate(explosion, transform.position, transform.rotation);
    if (other.tag == "Player")
        Instantiate(playerExplosion, other.transform.position, other.transform.rotation);
    Destroy(other.gameObject);
    Destroy(gameObject);
}

}

运行结果及报错内容

陨石不会被子弹打爆

多了一个return,删除一个就行了

img