var density : float
Description
The density of the cloth.
This sets the mass of the cloth per area. Must be greater than zero.
Changing this property causes the cloth simulation to reset.
transform.GetComponent(InteractiveCloth).density = 50;
using UnityEngine;
using System.Collections;
public class example :
MonoBehaviour {
void Awake() {
transform.GetComponent<InteractiveCloth>().density = 50;
}
}
import UnityEngine
import System.Collections
class example(
MonoBehaviour):
def
Awake():
transform.GetComponent[of InteractiveCloth]().density = 50