# GetSourceTextureWidthAndHeight(out int, out int)

> Gets the source texture's width and height.

## Definition

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

## GetSourceTextureWidthAndHeight(int, int)

```csharp
public void GetSourceTextureWidthAndHeight(out int width, out int height)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The source texture's width.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The source texture's height.

### Remarks

Texture importer settings can affect the width and height of the imported texture. This method provides the source image's dimensions. This method throws an exception if the texture has not finished importing. For example, it would throw an exception if you called this method in an [AssetPostprocessor.OnPreprocessAsset()](/engine/6000.3/script-reference/unityeditor/assetpostprocessor/onpreprocessasset.md) callback.
