# CameraComponent

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 37.0.0</span>
</div>

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

The CameraComponent handles interactions with cameras.

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

## Members at a glance

| Kind | Members |
|---|---|
| **Fields** | [ComponentType](#componenttype) |
| **Properties** | [ComponentId](#componentid) · [Name](#name) |
| **Methods** | [ToString](#tostring) |

## Fields

### ComponentType

<div class="api-card">
<span id="F:Sansar.Simulation.CameraComponent.ComponentType"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 37.0.0</span></div>

```csharp signature
public static readonly ComponentType ComponentType
```

The [`CameraComponent.ComponentType`](/scripting/api/sansar.simulation/cameracomponent#componenttype) of this component

</div>


## Properties

### ComponentId

<div class="api-card">
<span id="P:Sansar.Simulation.CameraComponent.ComponentId"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 37.0.0</span></div>

```csharp signature
public Sansar.Script.ComponentId ComponentId { get; }
```

Retrieves the component id for this CameraComponent.

**Value:** [Sansar.Script.ComponentId](/scripting/api/sansar.script/componentid) — The id.

</div>

### Name

<div class="api-card">
<span id="P:Sansar.Simulation.CameraComponent.Name"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 37.0.0</span></div>

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

This CameraComponent name, as specified in the editor.

</div>


## Methods

### ToString

<div class="api-card">
<span id="M:Sansar.Simulation.CameraComponent.ToString"></span>
<span id="M:Sansar.Simulation.CameraComponent.ToString()"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 37.0.0</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>


## Used in examples

- `CameraShakeExample.cs`
- [InteractionScreenshot.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/InteractionScreenshot.cs)
- [ScriptLibrary/Scene/Screenshot.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Screenshot.cs)

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