Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetFloat

Set a float property.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

SetFloat(string, float)

Set a float property.
public void SetFloat(string name, float value)

Parameters

name

The name of the property.

value

The float value to set.

Remarks

Adds a property to the block. If a float property with the given name already exists, the old value is replaced.

SetFloat(int, float)

Set a float property.
public void SetFloat(int nameID, float value)

Parameters

nameID

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

value

The float value to set.

Remarks

Adds a property to the block. If a float property with the given name already exists, the old value is replaced.