文档

Unity Engine

Download Unity

Unity Engine

GetTexture

Gets the texture that corresponds to the bound named expression.
阅读时间1 分钟最后更新于 16 天前

Definition

GetTexture(int)

Gets the texture that corresponds to the bound named expression.
public Texture GetTexture(int nameID)

Parameters

nameID

The name ID of the property retrieved by Shader.PropertyToID.

Returns

Type

Description

TextureThe texture that corresponds to the bound named expression.

Remarks

Throws an ArgumentException if the entry isn't available or its type doesn't match.

GetTexture(string)

Gets the texture that corresponds to the bound named expression.
public Texture GetTexture(string name)

Parameters

name

The name of the property.

Returns

Type

Description

TextureThe texture that corresponds to the bound named expression.

Remarks

Throws an ArgumentException if the entry isn't available or its type doesn't match.