# TextureScaleOffsetProperty

> Draws tiling and offset properties for a texture, using automatic GUI layout.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/7000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## TextureScaleOffsetProperty(MaterialProperty)

Draws tiling and offset properties for a texture, using automatic GUI layout.

```csharp
public void TextureScaleOffsetProperty(MaterialProperty property)
```

### Parameters

**** (\[MaterialProperty]\(/engine/7000.0/script-reference/unityeditor/materialproperty)): Property to draw.

### Remarks

This is similar to [MaterialEditor.TextureScaleOffsetProperty(Rect, MaterialProperty)](/engine/7000.0/script-reference/unityeditor/materialeditor/texturescaleoffsetproperty.md#texturescaleoffsetproperty\(rect-materialproperty\)), except the rect is determined automatically.

## TextureScaleOffsetProperty(Rect, MaterialProperty)

Draws the tiling and offset fields of a texture property, as part of a texture property control.

```csharp
public float TextureScaleOffsetProperty(Rect position, MaterialProperty property)
```

### Parameters

**** (\[Rect]\(/engine/7000.0/script-reference/unityengine/rect)): The position and size of the control.**** (\[MaterialProperty]\(/engine/7000.0/script-reference/unityeditor/materialproperty)): The texture property to draw the fields for.

### Returns

| Type                                                          | Description                                   |
| ------------------------------------------------------------- | --------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The height, in pixels, that the control uses. |

### Remarks

This overload draws the fields as part of a large texture property control. To draw them separately, use the overload that takes `partOfTexturePropertyControl`.

## TextureScaleOffsetProperty(Rect, MaterialProperty, bool)

Draws the tiling and offset fields of a texture property, either inside a texture property control or separately.

```csharp
public float TextureScaleOffsetProperty(Rect position, MaterialProperty property, bool partOfTexturePropertyControl)
```

### Parameters

**** (\[Rect]\(/engine/7000.0/script-reference/unityengine/rect)): The position and size of the control.**** (\[MaterialProperty]\(/engine/7000.0/script-reference/unityeditor/materialproperty)): The texture property to draw the fields for.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true to draw the fields as part of a large texture property control. Set to false to draw them separately.

### Returns

| Type                                                          | Description                                   |
| ------------------------------------------------------------- | --------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The height, in pixels, that the control uses. |

## TextureScaleOffsetProperty(Rect, Vector4)

Draws separate tiling and offset fields for explicit values instead of a material property.

```csharp
public static Vector4 TextureScaleOffsetProperty(Rect position, Vector4 scaleOffset)
```

### Parameters

**** (\[Rect]\(/engine/7000.0/script-reference/unityengine/rect)): The position and size of the control.**** (\[Vector4]\(/engine/7000.0/script-reference/unityengine/vector4)): The tiling and offset values, packed into a `Vector4` as tiling x, tiling y, offset x, offset y.

### Returns

| Type                                                              | Description                                                                                    |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [Vector4](/engine/7000.0/script-reference/unityengine/vector4.md) | The tiling and offset values, which might have changed if the user interacted with the fields. |

### Remarks

This overload draws the fields separately, not as part of a texture property control. To draw them inside a texture property control, use the overload that takes `partOfTexturePropertyControl`.

## TextureScaleOffsetProperty(Rect, Vector4, bool)

Draws tiling and offset fields for explicit values, either inside a texture property control or separately.

```csharp
public static Vector4 TextureScaleOffsetProperty(Rect position, Vector4 scaleOffset, bool partOfTexturePropertyControl)
```

### Parameters

**** (\[Rect]\(/engine/7000.0/script-reference/unityengine/rect)): The position and size of the control.**** (\[Vector4]\(/engine/7000.0/script-reference/unityengine/vector4)): The tiling and offset values, packed into a `Vector4` as tiling x, tiling y, offset x, offset y.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true to draw the fields as part of a large texture property control. Set to false to draw them separately.

### Returns

| Type                                                              | Description                                                                                    |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [Vector4](/engine/7000.0/script-reference/unityengine/vector4.md) | The tiling and offset values, which might have changed if the user interacted with the fields. |
