2014-09-04 18:58:22|?次阅读|上传:huigezrx【已有?条评论】发表评论
关键词:游戏, 虚拟现实, Unity3D|来源:唯设编程网
计算出纹理大小总计:宽*高*bpp曾记33% 如果你有Mipmaps。
By default Unity compressed all textures when importing. This can be turned off in the Preferences for faster workflow. But when building a game, all not-yet-compressed textures will be compressed.
到导入时,Unity默认压缩所有的纹理。这可以在参数选择里关闭为加快工作流程。但当编译一个游戏时,所有没有压缩的纹理将被压缩。
Optimizing mesh and animation size 优化网格和动画大小
Meshes and imported Animation Clips can be compressed so they take up less space in your game file. Compression can be turned on in Mesh Import Settings.
网格和导入的动画剪辑可以被压缩因此它们占去少的空间在你的游戏文件里。压缩可以开启在网格导入设置里。
Mesh and Animation compression uses quantization, which means it takes less space but the compression can introduce some inaccuracies. Experiment with what level of compression is still acceptable for your models.
网格和动画压缩使用量化,这意味着它占用少的空间但压缩可能引入一些不准确度。为你的模型实验什么样的压缩级别是可以接受的。
Note that mesh compression only produces smaller data files, and does not use less memory at run time. Animation Keyframe reduction produces smaller data files and uses less memory at run time, and generally you should always use keyframe reduction.
请注意,网格压缩只处理小型数据文件,并不在运行时使用较少的内存。动画关键帧还原生成较小的数据文件和在运行时使用较少的内存,通常你应该总是使关键帧减少。
Additionally, you can choose not to store normals and/or tangents in your Meshes, to save space both in the game builds and memory at run time. This can be set in Tangent Space Generation drop down in Mesh Import Settings. Rules of thumb:
此外,你可以选择不要在你的网格平均和/或切线,既节省空间,在游戏中建立和内存在运行时。这可以在导入设置里里切线空间生成里设置下降。经验法则:
Reducing included dlls in the Web Player 减少包含的dlls在web播放器里
When building a Web player it is important to not depend on System.dll or System.Xml.dll. Unity does not include System.dll or System.Xml.dll in the web player installation. That means, if you want to use Xml or some Generic containers which live in System.dll then the required dlls will be included in the web player. This usually adds 1mb to the download size, obviously this is not very good for the distribution of your web player and you should really avoid it. If you need to parse some Xml files, you can use a smaller xml library like this one Mono.Xml.zip. While most Generic containers are contained in mscorlib, Stack<> and few others are in System.dll. So you really want to avoid those.