Documentation

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.
Read time 1 minuteLast updated 6 days ago

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.