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.


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:


  • Tangents are used for bump-mapping. If you don't use bump-mapping, you probably don't need to store tangents in those meshes.
  • 切线用于凹凸映射。如果你不使用凹凸映射,你可能并不需要存储在这些网格切线。
  • Normals are used for lighting. If you don't use realtime lighting on some of your meshes, you probably don't need to store normals in them.
  • 正常用于照明。如果你不使用你的网格一些实时照明,你可能不需要存储正常在它们里。

Reducing included dlls in the Web Player 减少包含的dllsweb播放器里

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.

发表评论0条 】