最近需要给场景加载一个简单的天气变幻功能,学了两天终究入门了,分享给大家 :
1. 首先第一步下载一个UniStorm Mobile v2.4.1.2
//下载链接:download.youkuaiyun.com/download/qq_42310470/12257423
2.导入成功后把,把报错不兼容的代码全部删除反正也用不到
3.初始化UniStorm
打开 APS 窗口(Unity菜单栏:Window -> UniStorm -> Auto Player Setup -> C#)
在APS窗口中设置 Camera Type 、 Player Object 、 Main Camera 、 Character Type
4.创建一个空物体,
5.给空物体加上如下c#脚本(我只试了这几个天气 应该还有不少)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class changeweather : MonoBehaviour
{
UniStormWeatherSystem_C UniStormSystem;
// Start is called before the first frame update
private void OnGUI()
{
Rect rect1 = new Rect(10, 20, 50, 30);
Rect rect2 = new Rect(10, 60, 50, 30);
Rect rect3 = new Rect(10, 100, 50, 30);
Rect rect4 = new Rect(10, 140, 50, 30);