# SetConstrainProportions

> Sets Constrain Proportions as it would be set in the Transform Inspector window.

## Definition

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

## SetConstrainProportions(Transform, bool)

Sets Constrain Proportions as it would be set in the Transform Inspector window.

```csharp
public static void SetConstrainProportions(Transform transform, bool enabled)
```

### Parameters

**** (\[Transform]\(/engine/6000.7/script-reference/unityengine/transform)): Transform to set Constrain Proportions for.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Enable/Disable Constrain Proportions for passed transforms.

## SetConstrainProportions(Transform\[], bool)

Sets Constrain Proportions as it would be set in the Transform Inspector window.

```csharp
public static void SetConstrainProportions(Transform[] transforms, bool enabled)
```

### Parameters

**** (\[Transform\[]]\(/engine/6000.7/script-reference/unityengine/transform)): Transforms to set Constrain Proportions for.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Enable/Disable Constrain Proportions for passed transforms.
