using UnityEngine; namespace Funique { /// /// Auto rotation
/// ------------------------------------------------
/// 自動旋轉 ///
[AddComponentMenu("Funique/Core/Auto Rotate")] public class AutoRotate : MonoBehaviour { // 變數 #region Field [Tooltip("選轉的方向")] [SerializeField] Vector3 Angle = Vector3.zero; [SerializeField] Space Space = Space.Self; #endregion // Unity 事件 #region Unity Event private void FixedUpdate() { transform.Rotate(Angle, Space); } #endregion } }