网站后台显示连接已重置,制作网站如何选择主机,装修室内设计培训学校,什么主题和风格的网站好13.1 资源热更新——AssetBundle1-1_哔哩哔哩_bilibili Resources 性能消耗较大
Resources文件夹大小不能超过2个G 获取AssetBundle中的资源 打包流程 选择图片后点击 创建文件夹#xff0c;Editor优先编译 打包文件夹位置 using UnityEditor; using UnityEngine; public cla… 13.1 资源热更新——AssetBundle1-1_哔哩哔哩_bilibili Resources 性能消耗较大
Resources文件夹大小不能超过2个G 获取AssetBundle中的资源 打包流程 选择图片后点击 创建文件夹Editor优先编译 打包文件夹位置 using UnityEditor; using UnityEngine; public class SimpleBuild : Editor { [MenuItem(AssetBundle/EasyBuild)] public static void EasyBuild() { BuildPipeline.BuildAssetBundles(Application.dataPath /ABPackage/*Bundle输入路径*/, //BuildAssetBundleOptions.None--LZMA包小加载慢 BuildAssetBundleOptions.ChunkBasedCompression,/*包中等加载快*/ //BuildAssetBundleOptions.UncompressedAssetBundle---不压缩加载快 //目标平台 ,苹果平台BuildTarget.StandaloneOSX BuildTarget.StandaloneWindows64 ); } } 加载 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class SimpleLoad : MonoBehaviour { public RawImage showImg; private void Start() { //简单文件加载 AssetBundle loadedPicAssetBundle.LoadFromFile(Application.dataPath /ABPackage/unitypicture); //解包 Texture texture loadedPic.LoadAssetTexture(Unity); showImg.texture texture; } } p161