how to scale cube in game mode with mouse clicks??

hi friends i want to scale the cube in game mode with mouse clicks i.e., I want to increase and decrease the height of cube in game mode …please help me out

clicking @brullix3000

Well pretty much all you need is this:

using UnityEngine;
using System.Collections;

public class Click_Scaler : MonoBehaviour

	public float scaleBy;
	public Transform cubeTrans;

	void OnMouseDown ()
		cubeTrans.localScale.Scale (new Vector3 (scaleBy, scaleBy, scaleBy));

Add this to your button. “scaleBy” is the amount you want to scale it by on click.

“cubeTrans” is the Transform of your Cube object.

Good luck! :slight_smile: