Version: 2017.2
Removed

GameObject.collider

切换到手册
Obsolete public Component collider ;

描述

附加到此 GameObject 的 Collider(只读)。(如果未附加,则为 null)。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public GameObject other; void Example() { other.collider.material.dynamicFriction = 1; } }