当前位置:网站首页>The untiy Resources directory dynamically loads resources
The untiy Resources directory dynamically loads resources
2022-08-01 16:16:00 【Wu Zimu】
First of all, the folder must be called Resources, and the name cannot be wrong.
All resources in Resources will be loaded when the program starts. If the content is too large, it will have a greater impact on the startup time.Care not to recommend using
but in practice we often use
This is an example of loading an audio clip
AudioClip ac = Resources.Load<AudioClip>("Voice/"+ voiceName);
There are two points to pay attention to
1. You do not need to write / before the secondary folder of Resources, and you need to write a / before the streamingAssets folder.
2. The Resources file only needs to give the file name, no suffix name is allowed
边栏推荐
猜你喜欢
Shell basic function writing
DOM series of touch screen events
pynlpir更新license Error: unable to fetch newest license解决方案
提速!进口婴幼儿配方产品出证仅需1-3天
ESP8266-Arduino编程实例-74HC595位移寄存驱动
首席工程师究竟是怎样的存在?
shell 基础之函数编写
LeetCode50天刷题计划(Day 8—— 盛最多水的容器(23.00-1.20)
DOM系列之classList属性
LeetCode50天刷题计划(Day 9—— 整数转罗马数字(20.40-22.10)
随机推荐
美国弗吉尼亚大学、微软 | Active Data Pattern Extraction Attacks on Generative Language Models(对生成语言模型的主动数据模式提取攻击)
A full review of mainstream timed task solutions
使用Canvas 实现手机端签名
HashCode technology insider interview must ask
主流定时任务解决方案全横评
便携烙铁开源系统IronOS,支持多款便携DC, QC, PD供电烙铁,支持所有智能烙铁标准功能
面试必问的HashCode技术内幕
27英寸横置大屏+实体按键,全新探险者才是安全而合理的做法
会议OA项目(六)--- (待开会议、历史会议、所有会议)
Spark: Cluster Computing with Working Sets
珠海市生物安全P3实验室主体结构封顶
京东软件测试面试题,仅30题就已经拯救了50%的人
显示为弹出窗口是什么意思(电脑总是弹出广告)
2.8K 120Hz触控双屏加持 灵耀X 双屏Pro 2022让办公无惧想象
MySQL [create and manage tables]
SQL函数 TIMESTAMPDIFF
Arduino无线下载 Arduino USB接口无线自动下载程序
ESP8266-Arduino编程实例-74HC595位移寄存驱动
Spark: Cluster Computing with Working Sets
js邯郸市地图网页源码下载