> For the complete documentation index, see [llms.txt](https://docs.elixir.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elixir.app/sdk/unity/getting-started/overview.md).

# Overview

{% embed url="<https://youtu.be/i1cBJNe8Gn0>" %}
Elixir Overlay - Getting Started
{% endembed %}

### Overview

<img src="/files/7CDRcYpEJGlsUiRXr409" alt="" class="gitbook-drawing">

The Elixir Overlay is a feature that allows developers to integrate features like NFT purchasing and friends chat seamlessly into their game.

While the overlay is provided by Elixir Launcher in-game automatically without any additional setup requirements, to integrate all the features of the overlay in-game, some setup is required.

### Initialization & Disposal

The overlay event buffer will be automatically initialized by the SDK upon a call to `PrepareElixir(apiKey)`.

The event buffer will remain initialized until application shutdown.

### Integration

Here is a minimal example:

<pre class="language-csharp" data-overflow="wrap" data-full-width="false"><code class="lang-csharp"><strong>using Elixir;
</strong>using Event = Elixir.Overlay.Event;
<strong>
</strong><strong>public class TestOverlayController : MonoBehaviour
</strong>{
	// ... we will assume that a method Log is implemented that prints
	// text on-screen.

	// To initialize simply initialize the SDK by calling PrepareElixir
	public void Init()
	{
		ElixirController.Instance.PrepareElixir("your api public key here");
		
		// after the SDK is initialized, you can assign to the delegates
		Event.OnCheckoutResult += HandleCheckoutResult;
		Event.OnOpenStateChange += HandleOpenStateChange;
	}
	
	private void HandleOpenStateChange(bool isOpen)
	{
		Log($"MOpenStateChange: {isOpen}");
	}

	private void HandleCheckoutResult(bool success, string sku)
	{
		Log($"MCheckoutResult: {success}");
	}

}
</code></pre>


---

# 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://docs.elixir.app/sdk/unity/getting-started/overview.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.
