当前位置:网站首页>untiy Resorces目录动态加载资源
untiy Resorces目录动态加载资源
2022-08-01 15:57:00 【吴梓穆】
首先文件夹必须叫Resources,名字不能错
Resources里的资源在程序启动时会全部加载一遍,如果内容过多过大,会对启动时间有比较大的影响,如果对性能比较在意不建议使用
但实际上我们经常用
这是一个加载音频片段的示例
AudioClip ac = Resources.Load<AudioClip>("Voice/"+ voiceName);
有两点需要注意
1 Resources的次级文件夹前不需要写 /,streamingAssets文件夹需要
2 Resources文件只需要给出文件名,不能加后缀名
边栏推荐
- eslint语法报错解决
- MySQL data processing of authorization 】 【
- 股票策略02 | 技术择时+行业因子+市值轮动
- 全网最全音视频媒体流
- 2.8K 120Hz触控双屏加持 灵耀X 双屏Pro 2022让办公无惧想象
- 高薪程序员&面试题精讲系列131之Eureka如何实现高可用?自我保护机制是怎么回事?
- 数据抽取过滤的时候,数据库字段update_at类型是timestamp,抽取T-1日数据这个变量条
- 接口测试框架开发实践5:配置文件读取
- 南京科技大学、中国电子科技第28研究所等联合|MLRIP: Pre-training a military language representation model with informative factual knowledge and professional knowledge base(预训练具有丰富事实知识和专业知识库的军事语言表示模型)
- ffmpeg视频剪辑中报错Could not write header for output file #0 (incorrect codec parameters ?): ……
猜你喜欢

商业智能BI业务分析思维:供应链分析 - 什么是牛鞭效应(一)

MySQL【数据处理的增删改】

VIM实用指南(0)基本概念与初次体验

LeetCode50天刷题计划(Day 10—— 三数之和(20.50-22.40)

Shell basic function writing

“查找附近的商铺”|Geohash+MySQL实现地理位置筛选

String comparison size in MySQL (date string comparison problem)

May 20, 2022 The most complete fish game navigation

LeetCode50天刷题计划(Day 9—— 整数转罗马数字(20.40-22.10)

LeetCode50天刷题计划(Day 7—— 字符串转换整数 (atoi) 12.20-15.20)
随机推荐
pytorch中tensor转成图片保存
LeetCode50天刷题计划(Day 10—— 三数之和(20.50-22.40)
Chapter 13 Manually create a REST service (1)
分布式数据库难题(一):数据分区
1个月写900多条用例,2线城市年薪33W+的测试经理能有多卷?
kubelet node pressure eviction
CSDN配置功能总结
SQL每日一练(牛客新题库)——第2天: 条件查询
LeetCode50天刷题计划(Day 7—— 字符串转换整数 (atoi) 12.20-15.20)
【repo】SyntaxError: invalid syntax
VIM实用指南(3)复制,粘贴 ,删除,撤销,重做指令速记
"Find nearby shops" | Geohash+MySQL realizes geographic location filtering
Could not write header for output file #0 (incorrect codec parameters ?): ……
eslint语法报错解决
链滴的几个 Markdown 语法没有渲染
Zhaoqi Science and Technology Innovation Platform attracts talents and attracts talents, and attracts high-level talents at home and abroad
轮询和长轮询的区别
hzero-resource秒退
实习日报-2022-7-30
面试必问的HashCode技术内幕