> For the complete documentation index, see [llms.txt](https://goreng-studios.gitbook.io/goreng-studios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://goreng-studios.gitbook.io/goreng-studios/api-reference/scene-management/ibootstrap.md).

# IBootstrap

### **Static Members**

* **`provider`**
  * **Description:** Static provider to resolve internal dependencies.

***

### **Methods**

* **`SetProvider(IDependencyProvider provider)`**
  * **Description:** Binds a dependency provider to the bootstrap.
  * **Parameters:**
    * `provider`: The provider to be used for resolving dependencies.
* **`OnBootstrapStartAsync`**
  * **Description:** Called when the bootstrap starts after the scene has been loaded.
  * **Returns:** A task representing the asynchronous operation.
* **`OnBootstrapStopAsync`**
  * **Description:** Called before the scene unloads to perform any necessary clean-up.
  * **Returns:** A task representing the asynchronous operation.
* **`UnloadAsync`**
  * **Description:** Unloads the current scene.
  * **Returns:** A task representing the asynchronous unload operation.
* **`FetchCanvas<T>`**
  * **Description:** Fetches an active canvas within the scene scope.
  * **Type Parameters:**
    * `T`: The type of canvas to fetch.
  * **Returns:** The canvas instance if found; otherwise, `null`.
* **`SceneWillUnloadAsync`**
  * **Description:** Called when the scene is about to unload.
  * **Returns:** A task representing the asynchronous operation.
* **`SceneWillLoadAsync`**
  * **Description:** Called when the scene is about to load.
  * **Returns:** A task representing the asynchronous operation.
* **`Load(IAsyncScene sceneContext)`**
  * **Description:** Called when the scene has finished loading to allow the bootstrap to run.
  * **Parameters:**
    * `sceneContext`: The context of the loaded scene.


---

# 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:

```
GET https://goreng-studios.gitbook.io/goreng-studios/api-reference/scene-management/ibootstrap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
