GetVector
Get a vector from the property block.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
GetVector(string)
Get a vector from the property block.
public Vector4 GetVector(string name)
Parameters
The name of the property.
Returns
Type | Description |
|---|---|
| Vector4 |
Remarks
Returns zero vector if not found. If the value is previously set using MaterialPropertyBlock.SetColor, the returned vector value is the sRGB color value converted for the active color space.
Additional Resources: MaterialPropertyBlock.GetColor, MaterialPropertyBlock.SetVector, MaterialPropertyBlock.SetColor.
GetVector(int)
Get a vector from the property block.
public Vector4 GetVector(int nameID)
Parameters
The name ID of the property retrieved by Shader.PropertyToID.
Returns
Type | Description |
|---|---|
| Vector4 |
Remarks
Returns zero vector if not found. If the value is previously set using MaterialPropertyBlock.SetColor, the returned vector value is the sRGB color value converted for the active color space.
Additional Resources: MaterialPropertyBlock.GetColor, MaterialPropertyBlock.SetVector, MaterialPropertyBlock.SetColor.