기술 자료

Unity Engine

Unity Engine

SetVector

Set a vector parameter.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

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

SetVector(int, Vector4)

Set a vector parameter.
public void SetVector(int nameID, Vector4 val)

Parameters

nameID

Property name ID, use Shader.PropertyToID to get it.

Value to set.

Remarks

Constant buffers are shared between all kernels in a single compute shader asset. Therefore this function affects all kernels in this ComputeShader.

SetVector(string, Vector4)

Set a vector parameter.
public void SetVector(string name, Vector4 val)

Parameters

name

Variable name in shader code.

Value to set.

Remarks

Constant buffers are shared between all kernels in a single compute shader asset. Therefore this function affects all kernels in this ComputeShader.