您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

22 行
518 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class RotateRectTransform : MonoBehaviour
{
public float rotationSpeed = 15f;
private Vector3 rotationVector;
private RectTransform rectTransform;
void Start()
{
rectTransform = gameObject.GetComponent<RectTransform>();
}
void Update()
{
rotationVector = Vector3.forward * rotationSpeed * Time.deltaTime;
rectTransform.Rotate(rotationVector);
}
}