【Uni2D】Uni2DEditorTextureAtlasPacker

来源:互联网 发布:简述数据预处理的内容 编辑:程序博客网 时间:2024/05/29 13:47

Uni2DEditorTextureAtlasPacker:Uni2D图集打包工具。仅用于编辑器下自动打包。Uni2D图片打包采用了开源打包项目MaxRectsBinPack.cpp的源码,有Sven Magnus移植到C#版本。研究打包模式的话可以了解下这个,采用的打包模式如下:

public enum FreeRectChoiceHeuristic

{
RectBestShortSideFit,///< -BSSF: Positions the rectangle against the short side of a free rectangle into which it fits the best.
RectBestLongSideFit,///< -BLSF: Positions the rectangle against the long side of a free rectangle into which it fits the best.
RectBestAreaFit,///< -BAF: Positions the rectangle into the smallest free rect into which it fits.
RectBottomLeftRule,///< -BL: Does the Tetris placement.
RectContactPointRule///< -CP: Choosest the placement where the rectangle touches other rects as much as possible.
};

0 0
原创粉丝点击