Select your preferred scripting language. All code snippets will be displayed in this language.
struct in UnityEngine.Playables
Implements interfaces:IPlayable
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
ClosePlayables are customizable runtime objects that can be connected together in a tree contained in a PlayableGraph to create complex behaviours.
Playables can be used to create complex and flexible data evaluation trees. They can be connected together (via PlayableExtensions.Connect), after which each Playable in the tree can set the "weight" or "influence" of each of its children. Once a tree of Playable is created, it can be "played" by using it with a PlayableDirector component. (see PlayableDirector.Play)
Once a Playable (or tree of Playable) is associated with a PlayableDirector, the player will traverse the Playables one by one. Each time it encounters a Playable in the tree, it will call its PrepareFrame method. This allows the Playable to "prepare itself for the next evaluation". It is during the PrepareFrame stage that each Playable can modify its children (either by adding new inputs or by removing some of them). This enables Playable to "spawn" new children branches in the Playable tree at runtime. This means that Playable trees are not static structures. They can adapt and change over time.
AnimationPlayables are a good example usage of the Playables. They allow existing AnimationClips to be connected together via AnimationPlayableMixers, on the fly. This can be used to programatically create animation behaviours such as locomotion blendtrees. Once a tree of AnimationPlayables is created, it can be passed to an Animator component via the Animator.Play method.
Null | Returns an invalid Playable. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information