GameObject.collider 碰撞器

var collider : Collider

Description描述

The Collider attached to this GameObject (Read Only). (null if there is none attached)
附属于这个游戏物体上的碰撞体(只读)。(如果没有则为空)

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public GameObject other;
	public void Awake() {
		other.collider.material.dynamicFriction = 1;
	}
}
var other : GameObject;
other.collider.material.dynamicFriction = 1;
Page last updated: 2010-12-13