文档

Unity Engine

Unity Engine

SetTexture(Texture2D, int)

Assign a texture to the specified layer.
阅读时间1 分钟最后更新于 1 天前

Definition

public void SetTexture(Texture2D texture, int layer = 0)

Parameters

texture


layer

Cannot be larger than PlatformIcon.maxLayerCount.

Remarks

Texture file must be stored in the project and instance obtained using AssetDatabase.LoadAssetAtPath.