开始Unity学习
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Script1 : MonoBehaviour { private void Start() { MeshRenderer meshRenderer = this.GetComponent<MeshRenderer>();//获取组件 meshRenderer.material.color = Color.green; } private void Update() { this.transform.Rotate(0, 0, 160 * Time.deltaTime);//每帧旋转物体,Time.DeltaTime 俩帧的时间间隔s } }
原文:https://www.cnblogs.com/kootimloe/p/14226828.html