# RegisterReflectiveAttribute

Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.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.Script">Namespace <a href="/scripting/api/sansar.script"><code>Sansar.Script</code></a></span>
<span>Inherits <a href="https://learn.microsoft.com/dotnet/api/system.attribute">Attribute</a></span>
</div>

<span id="T:Sansar.Script.RegisterReflectiveAttribute"></span>

Registers this class to be found via [`ScenePrivate.FindReflective`](/scripting/api/sansar.simulation/sceneprivate#findreflective).

```csharp
[System.AttributeUsage(System.AttributeTargets.Class)]
public class RegisterReflectiveAttribute : Attribute
```

## Remarks

Every instance of a reflective object with this attribute will be automatically registered with the scene to be found by [`ScenePrivate.FindReflective`](/scripting/api/sansar.simulation/sceneprivate#findreflective). Specific instances of a Reflective class can be registered manually with [`Reflective.Register`](/scripting/api/sansar.script/reflective#register). For script objects themselves it is recommended to use this attribute to minimize race conditions between Register calls and FindReflective calls.

## Members at a glance

| Kind | Members |
|---|---|
| **Constructors** | [RegisterReflectiveAttribute](#registerreflectiveattribute) |

## Constructors

### RegisterReflectiveAttribute

<div class="api-card">
<span id="M:Sansar.Script.RegisterReflectiveAttribute.#ctor"></span>
<span id="C:Sansar.Script.RegisterReflectiveAttribute()"></span>

```csharp signature
public RegisterReflectiveAttribute()
```

Automatically registers all instances of this class to be found with [`ScenePrivate.FindReflective`](/scripting/api/sansar.simulation/sceneprivate#findreflective) .

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

Every instance of a reflective object with this attribute will be automatically registered with the scene to be found by [`ScenePrivate.FindReflective`](/scripting/api/sansar.simulation/sceneprivate#findreflective). Specific instances of a Reflective class can be registered manually with [`Reflective.Register`](/scripting/api/sansar.script/reflective#register). For script objects themselves it is recommended to use this attribute to minimize race conditions between Register calls and FindReflective calls.

</details>

</div>




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