Version: 2017.2
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); } }