11 2022 档案

 
36. 更换unity terrain的地表贴图
摘要:设置alphamap的核心方法是TerrainData的SetAlphamaps方法,关键参数是alpha三维数组。它的前两维表示了splatmap的大小,最后一维表示layer数目,也就是所使用的splatmap的通道数 using UnityEngine;public class Example 阅读全文
posted @ 2022-11-23 23:50 蛋蛋弟弟大大 编辑
35: 切换场景
摘要:注意场景切换的脚本挂载的物体不能摧毁 场景都要放到buildsettings里 using System.Collections;using System.Collections.Generic;using UnityEngine; using UnityEngine.SceneManagement 阅读全文
posted @ 2022-11-16 18:20 蛋蛋弟弟大大 编辑

 

点击右上角即可分享
微信分享提示