首先找到一个loading素材,一张png的图片就可以,例如:
loading
然后添加如下代码,并把脚本放在这个图片上面:
public class Loading : MonoBehaviour
{
public float rotateSpeed = 400;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
this.gameObject.transform.Rotate(Vector3.back * rotateSpeed * Time.deltaTime);
}
}
网友评论