Version: 2017.3
public PhysicMaterial material ;

説明

コライダーによって使用されるマテリアル

マテリアルがコライダーによって共有されている場合は、 マテリアルを複製し、コライダーに割り当てます。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public float dynFriction; public float statFriction; public Collider coll; void Start() { coll = GetComponent<Collider>(); coll.material.dynamicFriction = dynFriction; coll.material.staticFriction = statFriction; } }