ドキュメント

Unity Engine

Unity Engine

GetMatrix

Get a named matrix value from the shader.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

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

GetMatrix(string)

Get a named matrix value from the shader.
public Matrix4x4 GetMatrix(string name)

Parameters

name

The name of the property.

Returns

Type

Description

Matrix4x4

Remarks

This is mostly used with custom shaders that need extra matrix parameters. Matrix parameters are not exposed in the material inspector, but can be set and queried with
SetMatrix
and
GetMatrix
from scripts.

GetMatrix(int)

Get a named matrix value from the shader.
public Matrix4x4 GetMatrix(int nameID)

Parameters

nameID

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

Returns

Type

Description

Matrix4x4

Remarks

This is mostly used with custom shaders that need extra matrix parameters. Matrix parameters are not exposed in the material inspector, but can be set and queried with
SetMatrix
and
GetMatrix
from scripts.