# UIScoreBoard

Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0

<div class="api-meta">
<span class="api-kind api-kind-class" data-pagefind-filter="kind:Class">Class</span>
<span data-pagefind-filter="namespace:Sansar.Simulation">Namespace <a href="/scripting/api/sansar.simulation"><code>Sansar.Simulation</code></a></span>
<span>Inherits <a href="/scripting/api/sansar.script/instanceinterface">Sansar.Script.InstanceInterface</a></span>
<span class="api-badge api-since">Added in 45.0.4</span>
</div>

<span id="T:Sansar.Simulation.UIScoreBoard"></span>

Manages a score board HUD element.

```csharp
public class UIScoreBoard : Sansar.Script.InstanceInterface
```

## Remarks

Used for competative games.

## Members at a glance

| Kind | Members |
|---|---|
| **Properties** | [Id](#id) · [Score0](#score0) · [Score1](#score1) |
| **Methods** | [Paint](#paint) · [ToString](#tostring) |

## Properties

### Id

<div class="api-card">
<span id="P:Sansar.Simulation.UIScoreBoard.Id"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 45.0.4</span></div>

```csharp signature
public int Id { get; }
```

The board&#39;s ID.

<details class="api-remarks"><summary>Remarks</summary>

This ID is only unique to this user&#39;s particular session. It is not globally unique.

</details>

</div>

### Score0

<div class="api-card">
<span id="P:Sansar.Simulation.UIScoreBoard.Score0"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 45.0.4</span></div>

```csharp signature
public string Score0 { get; }
```

The board&#39;s left score

</div>

### Score1

<div class="api-card">
<span id="P:Sansar.Simulation.UIScoreBoard.Score1"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 45.0.4</span></div>

```csharp signature
public string Score1 { get; }
```

The board&#39;s right score

</div>


## Methods

### Paint

<div class="api-card" id="paint-string-string-color-color-color-color-color-color">
<span id="M:Sansar.Simulation.UIScoreBoard.Paint(System.String,System.String,Sansar.Color,Sansar.Color,Sansar.Color,Sansar.Color,Sansar.Color,Sansar.Color)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 45.0.4</span></div>

```csharp signature
public void Paint(
    string score0,
    string score1,
    Sansar.Color colorScoreFg0,
    Sansar.Color colorScoreFg1,
    Sansar.Color colorScoreBg0,
    Sansar.Color colorScoreBg1,
    Sansar.Color colorFg,
    Sansar.Color colorBg
)
```

Paint the score board

| Parameter | Type | Description |
|---|---|---|
| `score0` | [string](https://learn.microsoft.com/dotnet/api/system.string) | Score of the left team. |
| `score1` | [string](https://learn.microsoft.com/dotnet/api/system.string) | Score of the right team. |
| `colorScoreFg0` | [Sansar.Color](/scripting/api/sansar/color) | The left score&#39;s text color. |
| `colorScoreFg1` | [Sansar.Color](/scripting/api/sansar/color) | The right score&#39;s text color. |
| `colorScoreBg0` | [Sansar.Color](/scripting/api/sansar/color) | The left score&#39;s background color. |
| `colorScoreBg1` | [Sansar.Color](/scripting/api/sansar/color) | The right score&#39;s background color. |
| `colorFg` | [Sansar.Color](/scripting/api/sansar/color) | The board&#39;s foreground color. |
| `colorBg` | [Sansar.Color](/scripting/api/sansar/color) | The board&#39;s background color. |

</div>

<div class="api-card" id="paint-string-string-color-color-color-color-color-color-action">
<span id="M:Sansar.Simulation.UIScoreBoard.Paint(System.String,System.String,Sansar.Color,Sansar.Color,Sansar.Color,Sansar.Color,Sansar.Color,Sansar.Color,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 45.0.4</span></div>

```csharp signature
public void Paint(
    string score0,
    string score1,
    Sansar.Color colorScoreFg0,
    Sansar.Color colorScoreFg1,
    Sansar.Color colorScoreBg0,
    Sansar.Color colorScoreBg1,
    Sansar.Color colorFg,
    Sansar.Color colorBg,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Paint the score board

| Parameter | Type | Description |
|---|---|---|
| `score0` | [string](https://learn.microsoft.com/dotnet/api/system.string) | Score of the left team. |
| `score1` | [string](https://learn.microsoft.com/dotnet/api/system.string) | Score of the right team. |
| `colorScoreFg0` | [Sansar.Color](/scripting/api/sansar/color) | The left score&#39;s text color. |
| `colorScoreFg1` | [Sansar.Color](/scripting/api/sansar/color) | The right score&#39;s text color. |
| `colorScoreBg0` | [Sansar.Color](/scripting/api/sansar/color) | The left score&#39;s background color. |
| `colorScoreBg1` | [Sansar.Color](/scripting/api/sansar/color) | The right score&#39;s background color. |
| `colorFg` | [Sansar.Color](/scripting/api/sansar/color) | The board&#39;s foreground color. |
| `colorBg` | [Sansar.Color](/scripting/api/sansar/color) | The board&#39;s background color. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

</div>

### ToString

<div class="api-card">
<span id="M:Sansar.Simulation.UIScoreBoard.ToString"></span>
<span id="M:Sansar.Simulation.UIScoreBoard.ToString()"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 45.0.4</span></div>

```csharp signature
public override string ToString()
```

A string representation of this object.

**Returns:** [string](https://learn.microsoft.com/dotnet/api/system.string) — A string representation of this object.

<details class="api-remarks"><summary>Remarks</summary>

The format of this string may change between releases.

</details>

</div>




<p class="api-generated" data-pagefind-ignore>Generated from the Sansar 47.10.0 client ScriptApi snapshot.</p>