文档

Unity Engine

Unity Engine

SetInt

This method is deprecated. Use MaterialPropertyBlock.SetFloat or MaterialPropertyBlock.SetInteger instead.
阅读时间1 分钟最后更新于 1 个月前

Definition

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

SetInt(string, int)

This method is deprecated. Use MaterialPropertyBlock.SetFloat or MaterialPropertyBlock.SetInteger instead.
public void SetInt(string name, int value)

Parameters

name

The name of the property.

value

The int value to set.

Remarks

Additional Resources: MaterialPropertyBlock.SetFloat.

SetInt(int, int)

This method is deprecated. Use MaterialPropertyBlock.SetFloat or MaterialPropertyBlock.SetInteger instead.
public void SetInt(int nameID, int value)

Parameters

nameID

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

value

The int value to set.

Remarks

Additional Resources: MaterialPropertyBlock.SetFloat.