Version: 2017.3
public Transform transform ;

描述

被该控制器撞击的变换组件。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnControllerColliderHit(ControllerColliderHit hit) { Debug.Log("I'm colliding with: " + hit.transform.name); } }