当前位置:网站首页>[notes] streamingassets
[notes] streamingassets
2022-07-04 12:23:00 【Porridge cook_ ninety-nine】
Streaming resources - Unity manual Unity Integrate most resources into the project when building the project . however , It is sometimes useful to put files into a normal file system on the target computer so that they can be accessed by pathname . An example of this is in iOS Deploy movie files on the device ; The original movie file must be located somewhere in the file system so that it can be accessed by PlayMovie Function to play .https://docs.unity3d.com/cn/2020.3/Manual/StreamingAssets.htmlUnity stay build Project When will most Assets Merge into Project in . however , Put the file into the normal file system on the target computer —— Make them accessible by pathname , Sometimes it is very useful .( such as , stay iOS Deploy movie files on the device , The original movie file must be located somewhere in the file system , Only by
PlayMovie Function to play .)
Unity Will Project Middle name is StreamingAssets( Case sensitive ) All files in the folder of are copied verbatim to a specific folder on the target computer . To get this folder , Use Application.streamingAssetsPath attribute . No matter when , To get StreamingAssets The best way to locate folders is to use Application.streamingAssetsPath , Because it always points to the correct location on the platform where the application is running .
Application.streamingAssetsPath The location of the return varies depending on the platform :
| Most platforms (Unity Editor 、Windows、Linux player 、PS4、Xbox One、Switch) | Application.dataPath + "/StreamingAssets" |
| macOS player | Application.dataPath + "/Resources/Data/StreamingAssets" |
| iOS | Application.dataPath + "/Raw" |
| Android | Use compressed APK/JAR Documents in documents : "jar:file://" + Application.dataPath + "!/assets" |
On platforms that cannot directly access streaming media resource files ( Such as Android and WebGL) Read streaming media resources on , Please use UnityWebRequest. For example , see also Application.streamingAssetsPath.
On many platforms ,StreamingAssets The folder location is read-only Of ; You cannot modify or write new files in these locations at runtime . Please use Application.persistentDataPath To get the writable folder location .
Be careful : be located StreamingAssets In folder .dll And script files do not participate in Script Compilation .
It can also be done through Resource Pack (Asset Bundle) or Addressable resources (Addressable) To access content that is not part of conventional game construction data , in many instances , These access methods are better than Streaming Assets Folder .
边栏推荐
- How to use the mongodb ID array to get multiple documents- How to get multiple document using array of MongoDb id?
- QQ group administrators
- Dos and path
- Practical dry goods: deploy mini version message queue based on redis6.0
- queue
- Recommend a cool geospatial data visualization tool with low code
- LxC shared directory addition and deletion
- French Data Protection Agency: using Google Analytics or violating gdpr
- Alibaba cloud server connection intranet operation
- QQ group collection
猜你喜欢

Summary of Shanghai Jiaotong University postgraduate entrance examination module -- cryptography

Azure solution: how can third-party tools call azure blob storage to store data?

MySQL advanced review

QQ group collection

Exness: positive I win, negative you lose

IPv6 experiment

SAP ui5 date type sap ui. model. type. Analysis of the display format of date

Experiment 7. IPv6

Global function Encyclopedia

TCP slicing and PSH understanding
随机推荐
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 10
[the way of programmer training] - 2 Perfect number calculation
os. Path built-in module
Some summaries of the 21st postgraduate entrance examination 823 of network security major of Shanghai Jiaotong University and ideas on how to prepare for the 22nd postgraduate entrance examination pr
VBA, JSON interpretation, table structure -json string conversion
QQ get group member operation time
QQ set group information
'using an alias column in the where clause in PostgreSQL' - using an alias column in the where clause in PostgreSQL
Single spa, Qiankun, Friday access practice
template<typename MAP, typename LIST, typename First, typename ... Keytypes > recursive call with indefinite parameters - beauty of Pan China
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18
Summary of Shanghai Jiaotong University postgraduate entrance examination module -- cryptography
Awk getting started to proficient series - awk quick start
Here, the DDS tutorial you want | first experience of fastdds - source code compilation & Installation & Testing
French Data Protection Agency: using Google Analytics or violating gdpr
DDS-YYDS
[Chongqing Guangdong education] National Open University spring 2019 2727 tax basis reference questions
Reptile learning 4 winter vacation series (3)
2020 Summary - Magic year, magic me
MySQL advanced review