using UnityEngine; public class TextureRotator : MonoBehaviour { public float rotationStep = 45f; private Material material; private float currentRotation = 0f; void Start() { material = GetComponent().material; } void OnMouseDown() { currentRotation += rotationStep; // material.SetFloat("_Rotation", currentRotation); material.SetVector("Offset", new Vector4(0.5f, 0.5f, 0, 0)); } }