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. 用AB对Webservice做压力测试

    AB工具下载 AB工具介绍见 web压力测试工具 下载ab工具后放到任意目录下,从命令行打开ab.exe 使用以下命令测试Webservice ab -c 100 -n 1000 -p zip.txt ...

  2. .net core中的高效动态内存管理方案

    .net core在新增的System.Buffers中引入了一大堆高效内存管理的类,如span和memory.内存池.本文今天这里介绍一个高效动态内存访问方案. ReadOnlySequenceSe ...

  3. Keil debugging techniques and alternative printf (SWO function)

    One of the basic needs of the embedded software development through the terminal to output debugging ...

  4. CF 427D Match &amp; Catch 求最短唯一连续LCS

    题目来源:CF 427D Match & Catch 题意:给出2个字符串 求最短的连续的公共字符串 而且该字符串在原串中仅仅出现一次 思路:把2个字符串合并起来求height 后缀数组hei ...

  5. 数据访问:Implementing Efficient Transactions

    An OLTP scenario is characterized by a large number of concurrent operations that create, update, an ...

  6. 完全定制UITabBarViewController

    完全定制UITabBarViewController 效果   源码 https://github.com/YouXianMing/iOS-Project-Examples 中的 TotalCusto ...

  7. 监听home键+模拟home键

    一.监听home键首先定义一个广播接受者 HomeKeyReceiver package com.kale.floattest; import com.kale.floattest.service.D ...

  8. 《iOS 7 应用开发实战详解》

    <iOS 7 应用开发实战详解> 基本信息 作者: 朱元波    管蕾 出版社:人民邮电出版社 ISBN:9787115343697 上架时间:2014-4-25 出版日期:2014 年5 ...

  9. REQUEST_TIMEOUT 解决方案

    you need to pass an npmrc file when you install the business network onto the peers. For more info s ...

  10. perf 高级命令简介

    perf 高级命令简介 1.使用 tracepoint 当 perf 根据 tick 时间点进行采样后,人们便能够得到内核代码中的 hot spot. 使用ls命令来演示 sys_enter 这个tr ...