当前位置:网站首页>[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 .
边栏推荐
- os. Path built-in module
- IO stream ----- open
- CSDN documentation specification
- Simple understanding of seesion, cookies, tokens
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18
- 2018 meisai modeling summary +latex standard meisai template sharing
- About the use of URL, href, SRC attributes
- How to use the mongodb ID array to get multiple documents- How to get multiple document using array of MongoDb id?
- TCP slicing and PSH understanding
猜你喜欢
![Entitas learning [iv] other common knowledge points](/img/1c/f899f4600fef07ce39189e16afc44a.jpg)
Entitas learning [iv] other common knowledge points
![Entitas learning [3] multi context system](/img/f9/a3ce86ff2121dd1043305b7e834cc5.jpg)
Entitas learning [3] multi context system
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7](/img/44/1861f9016e959ed7c568721dd892db.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7

Method of setting default items in C # ComboBox control code
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20](/img/d5/4bce239b522696b5312b1346336b5f.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20

What if the chat record is gone? How to restore wechat chat records on Apple Mobile

Games101 Lesson 8 shading 2 Notes

Experiment 7. IPv6

Hongke case study on storm impact in coastal areas of North Carolina using lidar

Alibaba cloud server connection intranet operation
随机推荐
Games101 Lesson 8 shading 2 Notes
PKCs 5: password based cryptography specification version 2.1 Chinese Translation
Star leap plan | new projects are continuously being recruited! MSR Asia MSR Redmond joint research program invites you to apply!
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11
Foreach (system.out:: println) usage
Dos and path
[directory] search
Local MySQL forgot the password modification method (Windows)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20
Lvs+kept highly available cluster
[ES6] template string: `string`, a new symbol in es2015
Practical dry goods: deploy mini version message queue based on redis6.0
QQ get group link, QR code
Solaris 10 network services
Force buckle 142 Circular linked list II
netstat
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21
Attributes and methods in math library
About the use of URL, href, SRC attributes