脚本/功能 【更新】Static Sprites 1.0.3

Unity插件信息
插件名称: Static Sprites
插件官网: https://assetstore.unity.com/packages/tools/sprite-management/static-sprites-271347
版本: 1.0.3
解压密码:
素材类型: 脚本/功能









Static Sprites is a lite tool to optimize the rendering of non-moving sprites. The improved performance means you can now render thousands of sprites on even low-end mobile devices without a hitch!

As a technical background, Unity normally dynamically batches the rendering of sprites as an optimization. Dynamic batching means it groups the geometry into similar renderable batches each frame, and this generally works pretty well for small moving geometry. However, dynamic batching is not optimal for non-moving sprites, since the CPU still does a lot of work constructing the batches each frame. If you open the Unity Profiler or Frame Stats, you can check the Dynamic Batching batched draw calls count. That is all the redundant work, since the sprites don't move.

Static batching on the other hand, is much faster as it pre-generates the batches and geometry to be rendered just once. However, Unity's static batching system only works for meshes, unfortunately. Toggling the Static checkbox on sprites does nothing.

That's where Static Sprites comes in. Simply attach this component to a game object, and any sprite that is in the hierarchy under it is statically batched on start. It does this automatically, intelligently combining sprites into singular meshes while respecting differing materials, textures, atlasing, colors, sorting orders and layers, and Flip XY direction.

Features
Automatically static batches non-moving sprites
Supports differing textures, colors, materials, atlasing, sorting layer ID, sorting order, and Flip XY
API to unbatch sprites as well
Support for exporting combined sprites to a folder outside Play mode
See Technical Details for in-depth details.
And that’s it! If you are using sprites in your game, this is an easy-win for optimization.
Increase your framerate, save battery life, and render more sprites!


静态精灵是一个精简工具,用于优化非移动精灵的渲染。性能的提高意味着您现在可以在即使是低端移动设备上轻松渲染数千个精灵!

作为技术背景,Unity通常会动态批处理精灵的渲染作为优化。动态批处理意味着它将几何体分组到每帧类似的可渲染批中,这通常适用于小型移动几何体。然而,动态批处理对于不移动的精灵来说并不是最佳选择,因为CPU在每帧构建批处理时仍然要做很多工作。如果打开Unity Profiler或Frame Stats,则可以检查动态批处理批绘制调用计数。这些都是多余的工作,因为精灵不会动。

另一方面,静态批处理要快得多,因为它只预生成一次要渲染的批处理和几何体。然而,不幸的是,Unity的静态批处理系统仅适用于网格。切换精灵上的“静态”复选框什么也不做。

这就是静态精灵发挥作用的地方。只需将此组件附加到游戏对象上,其下层次结构中的任何精灵在开始时都会被静态批处理。它自动完成此操作,智能地将精灵组合到单个网格中,同时尊重不同的材质、纹理、图集、颜色、排序顺序和图层以及翻转XY方向。

特征
自动静态批处理不移动的精灵
支持不同的纹理、颜色、材质、图集、排序层ID、排序顺序和翻转XY
API也可以取消对精灵的匹配
支持将组合精灵导出到播放模式外的文件夹
有关详细信息,请参阅技术细节。
就是这样!如果你在游戏中使用精灵,这是一个很容易优化的胜利。
提高帧率,节省电池寿命,渲染更多精灵!





作者 cg小白兔 发表于 昨天 16:49
您需要登录后才可以回帖 登录 | 立即注册
cg小白兔

关注0

粉丝0

发布9663

热门作品推荐
glow
Hidden Object Game Template 1.36 找你妹
glow
Break Items - Toon VFX 1.0破碎物品效果
glow
【更新】Luma Based Ambient Occlusion 2 (
glow
【更新】Static Sprites 1.0.3
glow
Level Rotator - Hyper Casual Game 1.0躲
glow
【更新】Simple Bubble Shooter 1.1泡泡射
glow
Falling Box Man 1.0
glow
【更新】Asset Validator 1.0.1编辑器工具
glow
【更新】Spin The Circle - Complete Game
glow
【更新】UtahRaptor Real dinosaurs Series