# SUICanvas

**الأعضاء** 9

|       |                                                         |                                                                                                             |
| ----- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| خاصية | [IsRootCanvas](#isrootcanvas)                           | The avoidance radius for the agent.                                                                         |
| خاصية | [ScaleFactor](#scalefactor)                             | Scales all UI elements in the Canvas by this factor.                                                        |
| خاصية | [ReferencePixelsPerUnit](#referencepixelsperunit)       | If a sprite has this "Pixels Per Unit" setting, then one pixel in the sprite will cover one unit in the UI. |
| خاصية | [PixelPerfect](#pixelperfect)                           | Should the UI be rendered without antialiasing for precision?                                               |
| خاصية | [PlaneDistance](#planedistance)                         | The distance at which the UI plane should be placed in front of the camera.                                 |
| خاصية | [SortingOrder](#sortingorder)                           | Canvas' order within a sorting layer.                                                                       |
| خاصية | [TargetDisplay](#targetdisplay)                         | For Overlay mode, display index on which the UI canvas will appear.                                         |
| خاصية | [NormalizedSortingGridSize](#normalizedsortinggridsize) | The normalized grid size that the canvas will split the renderable area into.                               |
| خاصية | [GameObject](#gameobject)                               | –                                                                                                           |

## الخصائص

### IsRootCanvas

bool IsRootCanvas {get; }

The avoidance radius for the agent.

مثال

**Lua**

```lua
IsRootCanvas = Space.Host.ExecutingObject.UICanvas.IsRootCanvas

```

### ScaleFactor

float ScaleFactor {get; set; }

Scales all UI elements in the Canvas by this factor.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.UICanvas.ScaleFactor =  2.0

```

### ReferencePixelsPerUnit

float ReferencePixelsPerUnit {get; set; }

If a sprite has this "Pixels Per Unit" setting, then one pixel in the sprite will cover one unit in the UI.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.UICanvas.ReferencePixelsPerUnit =  50.0

```

### PixelPerfect

bool PixelPerfect {get; set; }

Should the UI be rendered without antialiasing for precision?

مثال

**Lua**

```lua
Space.Host.ExecutingObject.UICanvas.PixelPerfect =  true

```

### PlaneDistance

float PlaneDistance {get; set; }

The distance at which the UI plane should be placed in front of the camera.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.UICanvas.PlaneDistance =  2.0

```

### SortingOrder

int SortingOrder {get; set; }

Canvas' order within a sorting layer.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.UICanvas.SortingOrder =  2.0

```

### TargetDisplay

int TargetDisplay {get; set; }

For Overlay mode, display index on which the UI canvas will appear.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.UICanvas.TargetDisplay =  1

```

### NormalizedSortingGridSize

float NormalizedSortingGridSize {get; set; }

The normalized grid size that the canvas will split the renderable area into.

مثال

**Lua**

```lua
Space.Host.ExecutingObject.UICanvas.NormalizedSortingGridSize = 5.0

```

### GameObject

[SGameObject](/docs/ar/scripting/client-scripting-api-reference/types/sgameobject.md) GameObject {get; }

مثال

**Lua**

```lua
theGameObject = Space.Host.ExecutingObject.UICanvas.GameObject

```
