SetInt
This method is deprecated. Use Material.SetFloat or Material.SetInteger instead.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
SetInt(string, int)
This method is deprecated. Use Material.SetFloat or Material.SetInteger instead.
public void SetInt(string name, int value)
Parameters
Remarks
When you set values on materials that use the URP Lit shader, you might need to use Material.EnableKeyword to enable shader features that weren't previously in use. For more information, refer to Accessing Materials via Script. This function is just an alias to Material.SetFloat that casts the passed value to a float.
SetInt(int, int)
This method is deprecated. Use Material.SetFloat or Material.SetInteger instead.
public void SetInt(int nameID, int value)
Parameters
Remarks
When you set values on materials that use the URP Lit shader, you might need to use Material.EnableKeyword to enable shader features that weren't previously in use. For more information, refer to Accessing Materials via Script. This function is just an alias to Material.SetFloat that casts the passed value to a float.