GetTextureOffset
Gets the placement offset of texture propertyName.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
GetTextureOffset(string)
Gets the placement offset of texture .
propertyNamepublic Vector2 GetTextureOffset(string name)
Parameters
The name of the property.
Returns
Type | Description |
|---|---|
| Vector2 |
Remarks
Common texture names used by Unity's builtin shaders:
"_MainTex""_BumpMap""_Cube"Additional Resources: Material.mainTextureOffset property, Material.SetTextureOffset.
GetTextureOffset(int)
Gets the placement offset of texture .
propertyNamepublic Vector2 GetTextureOffset(int nameID)
Parameters
The name ID of the property retrieved by Shader.PropertyToID.
Returns
Type | Description |
|---|---|
| Vector2 |
Remarks
Common texture names used by Unity's builtin shaders:
"_MainTex""_BumpMap""_Cube"Additional Resources: Material.mainTextureOffset property, Material.SetTextureOffset.