feat(reference): add urp nahida sample project

This commit is contained in:
2026-04-19 00:33:03 +08:00
parent a65d5cfd21
commit 0819424e94
161 changed files with 17728 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using UnityEngine;
namespace Nahida
{
public class TransformRotator : MonoBehaviour
{
[SerializeField]
private float m_Cycle;
[SerializeField]
private Vector3 m_Axis;
private Quaternion _rotation;
private float _startTime;
private void OnEnable()
{
_rotation = transform.rotation;
_startTime = Time.time;
}
private void Update()
{
float angle = 360f * (Time.time - _startTime) / m_Cycle;
transform.rotation = Quaternion.AngleAxis(angle, m_Axis) * _rotation;
}
}
}