# Limitations

Embedded Mode has specific constraints you should be aware of when designing your state machines.

## No Prefab Support

Embedded graphs cannot be used in prefabs because scene references are lost when a prefab is instantiated.

### Workarounds

* Use **Asset Mode** with prefabs
* Store instance-specific data in **Runner Variables**
* Use **Self** and **Target** references instead of direct scene references

{% hint style="warning" %}
If you try to create an embedded state machine on a prefab, you'll see a "Prefabs are not supported" message.
{% endhint %}

## No Sharing

Embedded graphs are unique to their Runner component. Each embedded graph is an independent copy that cannot be shared between GameObjects.

### Workarounds

* Export the embedded graph as an asset for reuse
* Use Sub-State Machines to share common patterns
* Keep shared logic in Asset Mode, use Embedded only for scene-specific parts

## Duplication Behavior

When duplicating a GameObject with an embedded Runner:

| Aspect            | Behavior                          |
| ----------------- | --------------------------------- |
| Graph             | Copied to the new GameObject      |
| Scene References  | Maintained if objects still exist |
| Broken References | Displayed as "Missing"            |

{% hint style="info" %}
After duplicating, check that all scene references are still valid. Broken references will show as "Missing" in the Inspector.
{% endhint %}

## Scene Dependencies

Embedded graphs create tight coupling with scene objects:

* Moving the graph to another scene requires updating references
* Deleting referenced objects breaks the graph
* Renaming referenced objects may require reassignment

## Memory Considerations

Each embedded graph is stored separately, which means:

* Multiple copies increase memory usage
* Large embedded graphs on many objects can impact performance
* Consider Asset Mode for complex, frequently-used state machines


---

# Agent Instructions: 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://docs.ninjutsugames.com/game-creator-2/state-machine-2/embedded-mode/limitations.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.
