Version: 2021.3

TextureImporter.GetSourceTextureWidthAndHeight

切换到手册
public void GetSourceTextureWidthAndHeight (out int width, out int height);

参数

width The source texture's width.
height The source texture's height.

描述

Gets the source texture's width and height.

Texture importer settings can affect the width and height of the imported texture. This method provides the source image's dimensions. This method throws an exception if the texture has not finished importing. For example, it would throw an exception if you called this method in an AssetPostprocessor.OnPreprocessAsset callback.

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