기술 자료

Unity Engine

Download Unity

Unity Engine

TryGetFloat(int, out float)

Reads a float property that this pass has written, for example through a parameter binding.
읽는 시간 1분최근 업데이트: 12시간 전

Definition

TryGetFloat(int, float)

public bool TryGetFloat(int nameID, out float value)

Parameters

nameID

The property ID, from Shader.PropertyToID.

value

The value that the shader reads, or 0 when the method returns false.

Returns

Type

Description

boolTrue if this pass has written the property as a float.

Remarks

Unlike FilterParameterWriter.GetOrAddFloatRef, this method doesn't add the property. It doesn't read the value of the material.