Version: 2022.1

Texture2D.GenerateAtlas

切换到手册
public static bool GenerateAtlas (Vector2[] sizes, int padding, int atlasSize, List<Rect> results);

参数

sizes 一个包含矩形大小的数组。
padding 在图集中相邻矩形之间插入的填充量。
atlasSize 图集的大小。
results If the function succeeds, Unity populates this with the packed rectangles.

返回

bool Returns true if the function succeeds. Otherwise, returns false.

描述

将一组矩形打包成一个方形图集,并且可以选择在矩形之间进行填充。

另请参阅:PackTextures

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961