Most assets in Unity are combined into the project when it is built. However, it is sometimes useful to place files into the normal filesystem on the target machine to make them accessible via a pathname. An example of this is the deployment of a movie file on iOS devices; the original movie file must be available from a location in the filesystem to be played by the PlayMovie function.

当项目生成时Unity中的大多数资源都被整合到项目中。然而,在目标机器放置文件到正常文件系统中,有时很有用的。这样的一个例子是iOS设备上的电影文件的部署;在文件系统中的原始影片可以通过PlayMovie函数播放。

Any files placed in a folder called StreamingAssets in a Unity project will be copied verbatim to a particular folder on the target machine. On a desktop computer (Mac OS or Windows) the location of the files can be obtained with the following code:-

放在Unity项目中名为StreamingAssets文件夹中的任何文件将会被一字不差地复制到目标机器上的特定文件夹里。(Mac OS或Windows)桌面计算机上的文件的位置可以用下面的代码获得:-

path = = Application.dataPath + "/StreamingAssets";

On iOS, you should use:- 
在iOS上,你应该使用:-

path = Application.dataPath + "/Raw";

...while on Android, you should use:- 
而在Android上,应该使用:-

path = "jar:file://" + Application.dataPath + "!/assets/";

Note that on Android, the files are contained within a compressed .jar file (which is essentially the same format as standard zip-compressed files). This means that if you do not use Unity's WWW class to retrieve the file then you will need to use additional software to see inside the .jar archive and obtain the file.

请注意Android手机中的文件都包含在压缩的.jar文件中(这基本上与标准的zip压缩文件的格式相同)。这意味着,如果你不使用Unity中的WWW类去检索文件,那么你需要使用额外的软件去查看.jar的存档并获取该文件。

(文档)流媒体资源 Streaming Assets的更多相关文章

  1. iOS实战(零):开发社区、文档等资源

    社区 Apple官方资源 Xcode文档库: Window->Documentation and API Reference (可以在xcode的Preferences中下载最新的文档) iOS ...

  2. Chrome设计文档-多进程资源加载

    原文:Multi-process Resource Loading 背景 浏览器主进程及browser process处理所有的网络通信.原因有三点: Browser process可以控制每一个re ...

  3. 浏览器解析HTML文档的资源并下载

    <img />,<style>这些资源是并行请求与加载. <script>脚本是同步请求与加载,阻塞加载.加载完成并执行后再继续解析HTML. 动态<scri ...

  4. L18 如何快速查找文档获得帮助

    原地址:http://www.howzhi.com/course/286/lesson/2121 查找文档快速 苹果提供了丰富的文档,以帮助您成功构建和部署你的应用程序,包括示例代码,常见问题解答,技 ...

  5. Android XML文档解析(一)——SAX解析

    ---------------------------------------------------------------------------------------------------- ...

  6. ABP文档 - 嵌入的资源文件

    文档目录 本节内容: 简介 创建嵌入的文件 暴露嵌入的文件 使用嵌入的文件 简介 一个web应用里,客户端包含javascript,css,xml等文件,这此文件被添加到一个web项目后,发布成独立的 ...

  7. Bullet的学习资源(用Doxygen生成API文档)

    Bullet 全称 Bullet Physics Library,是著名的开源物理引擎(可用于碰撞检测.刚体模拟.可变形体模拟),这里将bullet的学习资源整理一下,希望能帮助入门者少走弯路. 看下 ...

  8. 资源下载南方cass视频教程,包括文档,数据,很全的

    废话就不多说了,开始... 北方cass视频教程,包括文档,数据,很全的 视频下载地址:http://www.400gb.com/file/23459263 GIS网盘进入下载:http://laoh ...

  9. 互联网常见Open API文档资源

    原文地址:http://blog.sina.com.cn/s/blog_4d8713560100y272.html 所谓的开放API(OpenAPI)是服务型网站常见的一种应用,网站的服务商将自己的网 ...

随机推荐

  1. 跟着老王学Python

    亲爱的朋友:     欢迎你!很高兴能在这里见到你,你能来到这里说明你真的很喜欢python,很想把python给学好!我觉的你很幸运,开始我学python的时候比较少资料,学起来也比较头疼,现在随着 ...

  2. 安装node.js / npm / express / KMC

    http://www.cnblogs.com/seanlv/archive/2011/11/22/2258716.html 1. 下载Node.js官方Windows版程序: http://nodej ...

  3. [erlang] mnesia

    原文地址: http://www.cnblogs.com/bluefrog/archive/2012/05/16/2504625.html 本来是项目合作的,可是你却一而再再而三的使用这招,我处理愤怒 ...

  4. NSString 拼接字符串

    NSString* string; // 结果字符串 NSString* string1, string2; //已存在的字符串,需要将string1和string2连接起来 //方法1. strin ...

  5. 技术人生:special considerations that are very important

    For the most part, a lot of what we know about software development can be applied to different envi ...

  6. Asp.Net中使用Couchbase——Memcached缓存入门篇

    本文个人同步博客地址: http://aehyok.com/Blog/Detail/96.html 个人网站地址:aehyok.com QQ 技术群号:206058845,验证码为:aehyok 本文 ...

  7. 生成模型(Generative Model)和 判别模型(Discriminative Model)

    引入 监督学习的任务就是学习一个模型(或者得到一个目标函数),应用这一模型,对给定的输入预测相应的输出.这一模型的一般形式为一个决策函数Y=f(X),或者条件概率分布P(Y|X). 监督学习方法又可以 ...

  8. EndNote在Word中插入文献不能自动生成编号 - 解决方案

    本文出处:新浪博客“小数码植物摄影”之http://blog.sina.com.cn/s/blog_629be3eb0100sih3.html 新浪博客“小数码植物摄影”首页:http://blog. ...

  9. [转]让Nginx支持ThinkPHP的URL重写和PATHINFO

    From : http://www.jzxue.com/wangzhankaifa/php/201108/08-8396.html   ThinkPHP支持通过PATHINFO和URL rewrite ...

  10. jquery each循环遍历完再执行的方法 因为each是异步的 所以要加计数器.

    query each循环遍历完再执行的方法因为each是异步的 所以要加计数器.var eachcount=0;$(“.emptytip”).each(function(){ eachcount++c ...