Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetFloat

Use this method to set the value of a float with the name you pass in.
Read time 1 minuteLast updated 6 days ago

Definition

SetFloat(int, float)

Use this method to set the value of a float with the name you pass in.
public void SetFloat(int nameID, float f)

Parameters

nameID

The ID of the property. This is the same ID that Shader.PropertyToID returns.

The new float value.

SetFloat(string, float)

Use this method to set the value of a float with the name you pass in.
public void SetFloat(string name, float f)

Parameters

name

The name of the property.

The new float value.