文档

Unity Engine

Unity Engine

TryGetProperty

Retrieves the value of a specified material property.
阅读时间1 分钟最后更新于 1 个月前

Definition

TryGetProperty(string, float)

Retrieves the value of a specified material property.
public bool TryGetProperty(string propertyName, out float value)

Parameters

propertyName

Name of the property.

value

The retrieved value.

Returns

Type

Description

boolReturns true if the property exists on the material. Returns false otherwise.

TryGetProperty(string, Vector4)

Retrieves the value of a specified material property.
public bool TryGetProperty(string propertyName, out Vector4 value)

Parameters

propertyName

Name of the property.

value

The retrieved value.

Returns

Type

Description

boolReturns true if the property exists on the material. Returns false otherwise.

TryGetProperty(string, string)

Retrieves the value of a specified material property.
public bool TryGetProperty(string propertyName, out string value)

Parameters

propertyName

Name of the property.

value

The retrieved value.

Returns

Type

Description

boolReturns true if the property exists on the material. Returns false otherwise.

TryGetProperty(string, TexturePropertyDescription)

Retrieves the value of a specified material property.
public bool TryGetProperty(string propertyName, out TexturePropertyDescription value)

Parameters

propertyName

Name of the property.

The retrieved value.

Returns

Type

Description

boolReturns true if the property exists on the material. Returns false otherwise.