- Home /
Question by
djnewty · Apr 23, 2015 at 03:30 PM ·
togglesettoggle buttonproperty
set property of object using a script?
Hi,
Ive got a toggle object and I would like to attach a script to this toggle object, to make it behave like a button.
I can do this with a script (if I create the toggle with the script).
However, I would like to set the property for an existing toggle (by attaching a script to the toggle)
The property I would like to set is as follows.
private bool pressed = true;
GUILayout.Toggle(pressed, "Toggle me!", "Button");
Sorry for such a noob question, but its got me stumped...
Comment