Versions with this page:
Versions without this page:
此游戏对象是否使用 tag 进行了标记?
tag
using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) Destroy(other.gameObject); } }