CompareTag
پنجشنبه, ۳ تیر ۱۳۹۵، ۰۴:۰۴ ب.ظ
gameover.blog.ir
اینم واسه سادگی هست به جای دو مساوی و برای خلاصه سازی مقایسه تگ ها:
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) Destroy(other.gameObject); } }
۹۵/۰۴/۰۳