Unity设置物体旋转

    int time = 1;
    void Update()
    {
        time++;
        this.GetComponent<RectTransform>().rotation = Quaternion.Euler(0, 0, time);
    }
    void OnDestroy()
    {
        time = 0;
    }

原文地址:https://www.cnblogs.com/ezhar/p/13128979.html