hi all
how can I transform an object, when I press a button:
example: i have a button and a cube.
if i press the button I want to change the size of the cube (“cube1”)
is this the only way:
function button_click(…)
{
// By name
var _object = GameObject.Find(“cube1”);
_object.transform.Translate(0, 1, 0);
or can i use something like this:
cube1.transform.translate(10,10,10)