기술 자료

Unity Engine

Unity Engine

collider

The collider that was hit by the controller.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public Collider collider { get; }

Examples

using UnityEngine;public class Example : MonoBehaviour{ void OnControllerColliderHit(ControllerColliderHit hit) { // Call a damage function on the object we hit. hit.gameObject.SendMessage("ApplyDamage", 5); }}