> For the complete documentation index, see [llms.txt](https://reflective-roommanager.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reflective-roommanager.gitbook.io/docs/user-manual/room-container/roomcontainerhelper.md).

# RoomContainerHelper

The purpose of this class is to access the [RoomContainer](/docs/user-manual/room-container.md) through this class with various extensions and perform various operations. In this way, it makes the use of the [RoomContainer](/docs/user-manual/room-container.md) class more streamlined and easier.

### Members

* `internal Scene Scene` **:**&#x20;
  * Class variable required to specify which scene the script is specific to and to perform operations for that class

### **Methods**

* ```csharp
  public RoomContainerHelper(Scene scene)
  ```
  * **Parameters:**
    * **scene**: reference scene to determine which scene to perform operations on.
  * Scene information to be used in the operations to be performed is brought
* <pre class="language-csharp"><code class="lang-csharp"><strong>public bool AddSingleton&#x3C;T>(T value) where T : class
  </strong></code></pre>
  * **Parameters:**
    * **T**: type of class to add
    * **value**: class to be added.
  * Calls the add method of the [RoomContainer](broken://pages/iYZafH41uulP0fYkUz2p) and sends the value and scene to be added to it.
  * Returns information whether it has been added or not.
* ```csharp
  public bool RemoveSingleton<T>(T element = null) where T : class
  ```
  * **Parameters:**
    * **T**: type of class to remove
    * **element**: class to be deleted
  * It calls the remove method of the [RoomContainer](broken://pages/iYZafH41uulP0fYkUz2p) and sends the type of the class and scene to be deleted.
  * Returns information whether it has been deleted or not
* ```csharp
  public T GetSingleton<T>() where T : class
  ```
  * **Parameters:**
    * **T**: type of class to call
  * It calls the Get method of the [RoomContainer](broken://pages/iYZafH41uulP0fYkUz2p) and sends the type of class and scene to be called.
  * The called class is returned
* <pre class="language-csharp" data-overflow="wrap" data-full-width="false"><code class="lang-csharp">public void RegisterListener&#x3C;T>(IRoomListener sceneListener) where T : IRoomListener
  </code></pre>
  * Parameters:
    * **T**: type of class to registered
  * It calls the registerListener method of the [RoomContainer](broken://pages/iYZafH41uulP0fYkUz2p) and sends the listener with the room name.
* <pre class="language-csharp" data-overflow="wrap"><code class="lang-csharp">public void UnRegisterListener&#x3C;T>(IRoomListener sceneListener) where T : IRoomListenerass
  </code></pre>
  * Parameters:
    * **T**: type of class to unregistered
  * It calls the unregisterListener method of the [RoomContainer](broken://pages/iYZafH41uulP0fYkUz2p) and sends the listener with the room name.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://reflective-roommanager.gitbook.io/docs/user-manual/room-container/roomcontainerhelper.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
