728x90 coroutine1 Unity & C# ~ 코루틴으로 회전하기 (Rotate Coroutine) Coroutine rotCoroutine = null; float rotSpeed = 30.0f; public void RotStartFunc() { rotCoroutine = StartCoroutine(CoroutineRotFunc()); } IEnumerator CoroutineRotFunc() { var angles = transform.rotation.eulerAngles; angles.z -= Time.deltaTime * rotSpeed; transform.rotation = Quaternion.Euler(angles); yield return null; rotCoroutine = StartCoroutine(CoroutineRotFunc()); } public void RotStopFunc().. 2022. 5. 31. 이전 1 다음 SMALL