Version: 2017.1
public GameObject gameObject ;

描述

被该控制器撞击的游戏对象。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnControllerColliderHit(ControllerColliderHit hit) { hit.gameObject.transform.position = Vector3.zero; } }