Collider.sharedMaterial 共享材质

var sharedMaterial : PhysicMaterial


The shared physic material of this collider.


Modifying this material will change the surface properties of all colliders using the material. In most cases you want to modify Collider.material instead.


using UnityEngine;

using System.Collections;

public class example : MonoBehaviour {

	public PhysicMaterial material;

	public void Awake() {

		collider.sharedMaterial = material;



var material : PhysicMaterial;

collider.sharedMaterial = material;
Page last updated: 2010-12-12