Simple Playable Example
✓ Published0🌍 Public
Aandybak
Last edited Apr 3, 2018
Created on Apr 3, 2018
This example demonstrates a playable graph that toggles a MonoBehaviour component’s enabled state at the start and end of a playable clip. It uses Unity’s Playables API, including `PlayableAsset`, `PlayableBehaviour`, and `ScriptPlayable`, with `ExposedReference` to resolve the target component. The `ToggleComponentAsset` creates a `ToggleComponentPlayable` that sets the component’s `enabled` flag in `OnBehaviourPlay` and `OnBehaviourPause`. The visible behavior is limited to enabling or disabling the component at clip boundaries, driven by the `EnabledOnStart` and `EnabledOnEnd` properties.
AI-generated description