UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"scale on mouse down"
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Scale : MonoBehaviour { private Vector3 big_Scale, small_Sacele; private bool is_big // Start is called before the first frame update void Start() { big_Scale = new Vector3(1f,1f, 1f); small_Sacele = new Vector3(0.25f, 0.25f, 0.25); is_big = true; } void OnMouseDown() { transform.localScale = is_big? small_Sacele: big_Scale; is_big = !is_big; } }