Limitations
Understanding the constraints of Embedded Mode
Last updated
Understanding the constraints of Embedded Mode
Embedded Mode has specific constraints you should be aware of when designing your state machines.
Embedded graphs cannot be used in prefabs because scene references are lost when a prefab is instantiated.
Use Asset Mode with prefabs
Store instance-specific data in Runner Variables
Use Self and Target references instead of direct scene references
If you try to create an embedded state machine on a prefab, you'll see a "Prefabs are not supported" message.
Embedded graphs are unique to their Runner component. Each embedded graph is an independent copy that cannot be shared between GameObjects.
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
When duplicating a GameObject with an embedded Runner:
Graph
Copied to the new GameObject
Scene References
Maintained if objects still exist
Broken References
Displayed as "Missing"
After duplicating, check that all scene references are still valid. Broken references will show as "Missing" in the Inspector.
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
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
Last updated