unity Quaternion.EulerRotation code example
Example 1: angle to quaternion unity
Quaternion rotation = Quaternion.Euler(0, /*the angle*/, 0);
Example 2: quaternion euler
using UnityEngine;public class Example : MonoBehaviour
{
void Start()
{
// A rotation 30 degrees around the y-axis
Quaternion rotation = Quaternion.Euler(0, 30, 0);
}
}