# Plugin Usage

## Add Constraint

<div align="left"><img src="https://3205728868-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCV8fFGCy655co4I0GK%2F-MCbKO05eg1-n7THZhjy%2F-MCbLIo0gvOkxmOZHAm3%2Fimage.png?alt=media&#x26;token=e8e0ac7d-efda-4195-b05a-24f1e7aace19" alt="Button in toolbar"></div>

### Description

Creates a **UIAspectRatio** constraint which maintains your GUI's height and width ratio across devices. **AspectRatio** is automatically calculated by the plugin.

### Usage

Select all children of your **ScreenGui** object and click **Add Constraint** button to scale.

{% hint style="info" %}
This feature is available to AutoScale Lite and Plus users. SmartScale has replaced this feature in AutoScale Nightly.
{% endhint %}

## Unit Conversion

<div align="left"><img src="https://3205728868-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCV8fFGCy655co4I0GK%2F-MCbKO05eg1-n7THZhjy%2F-MCbLtidFDQDPxYSt39f%2Fimage.png?alt=media&#x26;token=5d7d815c-f55b-4a66-a233-f5d10346c4ee" alt="Menu toggle button in toolbar"></div>

<div align="left"><img src="https://3205728868-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCV8fFGCy655co4I0GK%2F-MCbKO05eg1-n7THZhjy%2F-MCbMIx6G410XkUcQ6qj%2Fimage.png?alt=media&#x26;token=4c5746d8-c93f-4409-8860-6f3b1875008d" alt="Menu view once toggled"></div>

### Description

Allows easy conversion of **Size** and **Position** property units of **GuiBase2d** objects.

### Usage

Select your **GuiBase2d** objects in explorer and click the relevant button options to convert **Size**/**Position**.

{% hint style="info" %}
Recommended to use **Scale** unit for both Size **and** **Position** of your **GuiBase2d** objects for best scaling results.
{% endhint %}

## Plus Menu

<div align="left"><img src="https://3205728868-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCV8fFGCy655co4I0GK%2F-MCbKO05eg1-n7THZhjy%2F-MCbN-0UcJSvtPj1Ce8S%2Fimage.png?alt=media&#x26;token=73c4b693-843d-450b-ae70-002264fb77ca" alt="Menu toggle button in toolbar"></div>

<div align="left"><img src="https://3205728868-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCV8fFGCy655co4I0GK%2F-MCbKO05eg1-n7THZhjy%2F-MCbNJ32RN6_ntdC0Y-T%2Fimage.png?alt=media&#x26;token=85e833e5-65d3-4473-80d6-a2ba86cc6ffa" alt="Menu view once toggled"></div>

### Description

Allows you to change default properties of your **GuiBase2d** objects. Hate how Roblox uses **Offset** unit for **Size** by default? You can change that here.

### Usage

Open the Plus Menu and enable desired settings. Your settings will save and load automatically.

{% hint style="info" %}
This convenient feature is available to AutoScale Plus and Nightly users.
{% endhint %}

## SmartScale

<div align="left"><img src="https://3205728868-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCV8fFGCy655co4I0GK%2F-MCbKO05eg1-n7THZhjy%2F-MCbO4dRVLGcsCd545u8%2Fimage.png?alt=media&#x26;token=6e3affe0-56b4-4a44-8314-9dfd6e060666" alt="Button in toolbar"></div>

{% hint style="warning" %}
This is an beta feature for AutoScale Plus and Nightly testers, still needs code optimisation to improve speed.
{% endhint %}

### Description

SmartScale feature is an attempt to intelligently make scaling decisions for users.

### Usage

After creating your GUI, select the **ScreenGui** and press SmartScale button and it will scale everything in the ScreenGui for you.\
\
Alternatively, you can select a single GUI object and that particular object will be scaled\
e.g. Select a **TextBox** and it will add dynamic text scaling to only that specific GUI object

### Behaviour

Selecting **ScreenGui** Objects

* Applies **UIAspectRatio** constraint with calculated ratio if not already present to all children
* All **GuiBase2d** descendants' Position and Size property converted to Scale unit if property exists
* All **TextScaled** property objects are dynamically text scaled

Selecting standard **GuiBase2d** Objects

* All objects' Position and Size property converted to Scale unit if property exists
* If parent is a **ScreenGui** object, **UiAspectRatio** constraint applied to self

Selecting **TextScaled** property Objects

* If **TextScaled** Enabled
  * Adds **UITextSizeConstraint** if not already present, max size being original font size (using TextBounds property
* If **TextScaled** Disabled
  * Adds **UITextSizeConstraint** if not already present, max size being original font size and **enable** TextScaled property

Selecting standard **ScrollingFrame** Objects

* **AutomaticSize** is enabled, set to XY
* Sizes of all children are set to Offset.

{% hint style="info" %}
Credit to @VarysThe Eunuch for helping with research on dyanmic text scaling methods.
{% endhint %}
