Cloth button

hello,
i have made a falling cloth in unity with interacrtive cloth and cloth renderer.
but when i play the cloth starts falling allready,
i would like to set this to a button. so when i push the button the cloth starts falling.
i am adding this to a mobile app so i want to use the OnMouseDown function.

i am trying this.

public void OnMouseDown ()
{
Debug.Log("button works");
InteractiveCloth = false;  
}

but it returns this error.
error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer

The button is firing, the debug returns in the console.

What am i doing wrong here?
Thanks in advance.

Solved it already,
for anyone who want to know :slight_smile:

    private Cloth myCloth;
   
   
    public void Start ()
    {
    myCloth = GetComponent<InteractiveCloth>();
    }
   
   
    public void OnMouseDown ()
    {
    Debug.Log("button works");
    myCloth.enabled = !myCloth.enabled;
    }

you need to attach this piece of code onto the component you want to fire with a button. i got it from
http://unity3d.com/learn/tutorials/modules/beginner/scripting/enabling-disabling-components

Good luck :slight_smile: