Files
2026-03-04 10:03:45 +08:00

19 lines
379 B
C#

using UnityEngine;
using UnityEngine.EventSystems;
namespace Cooldhands.UICursor.Example
{
public class RotateOnSelected : MonoBehaviour
{
public Vector3 RotateVector = new Vector3(50f, 0f, 0f);
private void Update()
{
if (EventSystem.current.currentSelectedGameObject == base.gameObject)
{
base.transform.Rotate(RotateVector * Time.deltaTime);
}
}
}
}