# GetTextureOffset

> Gets the placement offset of texture propertyName.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## GetTextureOffset(string)

Gets the placement offset of texture `propertyName`.

```csharp
public Vector2 GetTextureOffset(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.

### Returns

| Type                                                              | Description |
| ----------------------------------------------------------------- | ----------- |
| [Vector2](/engine/6000.6/script-reference/unityengine/vector2.md) |             |

### Remarks

Common texture names used by Unity's builtin shaders:

`"_MainTex"` is the main diffuse texture. This can also be accessed via [Material.mainTextureOffset](/engine/6000.6/script-reference/unityengine/material/maintextureoffset.md) property.

`"_BumpMap"` is the normal map.

`"_Cube"` is the reflection cubemap.

Additional Resources: [Material.mainTextureOffset](/engine/6000.6/script-reference/unityengine/material/maintextureoffset.md) property, [Material.SetTextureOffset](/engine/6000.6/script-reference/unityengine/material/settextureoffset.md).

## GetTextureOffset(int)

Gets the placement offset of texture `propertyName`.

```csharp
public Vector2 GetTextureOffset(int nameID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.6/script-reference/unityengine/shader/propertytoid.md).

### Returns

| Type                                                              | Description |
| ----------------------------------------------------------------- | ----------- |
| [Vector2](/engine/6000.6/script-reference/unityengine/vector2.md) |             |

### Remarks

Common texture names used by Unity's builtin shaders:

`"_MainTex"` is the main diffuse texture. This can also be accessed via [Material.mainTextureOffset](/engine/6000.6/script-reference/unityengine/material/maintextureoffset.md) property.

`"_BumpMap"` is the normal map.

`"_Cube"` is the reflection cubemap.

Additional Resources: [Material.mainTextureOffset](/engine/6000.6/script-reference/unityengine/material/maintextureoffset.md) property, [Material.SetTextureOffset](/engine/6000.6/script-reference/unityengine/material/settextureoffset.md).
