添加自定义属性文件团结Android包 [英] add custom .properties file in unity android package

查看:172
本文介绍了添加自定义属性文件团结Android包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个是由我写某些Android的Java插件的统一要求.properties文件。我需要以某种方式添加此文件的统一应用的文件包,所以一旦统一IDE构建.apk文件,该文件位于APK的资产文件夹的根。
在哪里,我怎么放置在Unity IDE这个文件?我试图把它的资产之下,但我检查生成的.apk文件和文件没能有..

I have a .properties file that is required by some android java unity plugin that I am writing. I need to add this file to the unity app's package somehow, so once the unity IDE builds the .apk, the file is located in the root of the apk's assets folder. Where and how do I place this file in the Unity IDE? I tried putting it under Assets, but I inspected the resulting .apk file and the file did not make it there..

什么想法?
TNX

any ideas? tnx

推荐答案

您有包括在运行时访问的文件两个选项:

You have two options for including files accessible at runtime:

  • Managed assets in Ressources folders accessible via Resources.Load
  • Un-managed assets in the StreamingAssets folder accessible via the File or WWW APIs

您.properties文件或许应该驻留在StreamingAssets文件夹,如果你不需要Unity3D对其进行处理。 Unity3D将在资源文件夹优化资产。例如一个图像将具有设置为在IDE GUI或纹理。在StreamingAssets夹资产生,而不是由Unity3D IDE处理。因此,一个PNG是一个仍然在运行时经常PNG。 StreamingAssets是我们存储的MP4视频手机,我们不希望Unity3D重新连接code。

Your .properties file should probably reside in the StreamingAssets folder, if you don't need Unity3D to process it. Unity3D will optimize assets in the Resources folders. For example an image will have to set as GUI or Texture in the IDE. Assets in the StreamingAssets folder are raw and not processed by the Unity3D IDE. So a png is a still a regular png at runtime. StreamingAssets is where we store mp4 mobile videos we don't want Unity3D to re-encode.

这篇关于添加自定义属性文件团结Android包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆