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. FireDAC 下的 Sqlite [10] - 使用 R-Tree 搜索

    R-Tree 主要用于三维空间的搜索, 据说这种搜索算法非常之快, 哪怕百万条记录也是眨眼间的事! SQLite 支持 1-5 维, FireDAC 也提供了 TFDSQLiteRTree 控件以方便 ...

  2. Timer-triggered memory-to-memory DMA transfer demonstrator

    http://www.efton.sk/STM32/bt.c // Timer-triggered memory-to-memory DMA transfer demonstrator for STM ...

  3. [Go] Http包 使用简介

    请求的结构 HTTP 的交互以请求和响应的应答模式.Go 的请求我们早就见过了,handler 函数的第二个参数 http.Requests.其结构为: type Request struct { M ...

  4. IIS发布以后,handle文件找不到,404错误

    昨天碰到一个奇怪问题,开发环境没有问题,发布到IIS7.5以后,保存操作不能成功,跟踪发现,是handle方法找不到,抛错. 想了很多方法,最后把怀疑是GET方式和客户数据引起的问题,改成POST方式 ...

  5. Windows Application Data拒绝访问打开方法?

    在Windows7操作系统,打开 Application Data等文件夹时,弹出位置不可用的警告窗口,提示拒绝访问.下面提供简单的解决方法,希望有用. 工具/原料 计算机. Windows7操作系统 ...

  6. Delphi处理Android的路径信息

    路径操作就使用TPath的方法都很方便.usesSystem.IoUtilsTPath.GetTempPath//临时目录TPath.GetCameraPath//照相机目录(照片/录像)TPath. ...

  7. Instrument 实用详解

    苹果:Instruments User Guide iPhone Memory Debugging with NSZombie and Instruments 苹果:Mac OS X Debuggin ...

  8. (ios7) 解决代码布局View, ios7 中 subView 高度增加StatusBar20dp的问题,保证Ios6,ios7代码一致

    在ios7 布局中,Status Bar 和 ToolBar ,NavigateBar 等都包含在ViewControl的主View中. 这样原来ios6 的View布局 整体向上移动了20dp,下面 ...

  9. ibatis.net:第四天,Update 和 Delete

    xml <update id="UpdateOrder" parameterClass="Order"> UPDATE [Orders] SET C ...

  10. python测试开发django-23.admin列表页优化和排序

    前言 列表页优化和排序 ModelAdmin django的options.py里面 ModelAdmin类定义的参数可以设置admin后台列表页面,相关的参数如下 class ModelAdmin( ...