当前位置:网站首页>[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 .
边栏推荐
- Common tips
- Guava ImmutableSet. Builder source code analysis, shift original code, complement code, reverse code review
- Pat 1059 prime factors (25 points) prime table
- Reptile learning 4 winter vacation series (3)
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19
- Workplace liquor bureau must pay attention to
- Data communication and network: ch13 Ethernet
- LVS load balancing cluster deployment - Dr direct routing mode
- Configure SSH key to realize login free
- priority_ queue
猜你喜欢

MySQL advanced review
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19](/img/7c/f728e88ca36524f92c56213370399b.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7](/img/44/1861f9016e959ed7c568721dd892db.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7

The detailed installation process of Ninja security penetration system (Ninjitsu OS V3). Both old and new VM versions can be installed through personal testing, with download sources

nn. Exploration and experiment of batchnorm2d principle
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16](/img/c3/f3746b161012acc3751b2bd0b8f663.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16

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

netstat

Review of week 278 of leetcode II

The frost peel off the purple dragon scale, and the xiariba people will talk about database SQL optimization and the principle of indexing (primary / secondary / clustered / non clustered)
随机推荐
Haproxy cluster
Googgle guava ImmutableCollections
Reptile learning 4 winter vacation learning series (1)
PKCs 5: password based cryptography specification version 2.1 Chinese Translation
Configure SSH certificate login
Attributes and methods in math library
Translation D29 (with AC code POJ 27:mode of sequence)
Method of setting default items in C # ComboBox control code
Dos and path
QQ group collection
A few words explain redis cache penetration, breakdown, avalanche, and redis sentinel
Process communication and thread explanation
Introduction of network security research direction of Shanghai Jiaotong University
Xiaobing · beauty appraisal
QQ get group settings
[Chongqing Guangdong education] National Open University spring 2019 2727 tax basis reference questions
Day01 preliminary packet capture
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
Lvs+kept highly available cluster
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8