Class GhostAnimationGraphAsset
The main graph asset for a GhostAnimationController. All animation logic which needs to be synchronized should be expressed as an assets of this type. The asset can reference other assets to build a full graph.
Inherited Members
Namespace: Unity.NetCode.Hybrid
Syntax
public abstract class GhostAnimationGraphAsset : ScriptableObject
Methods
CreatePlayable(GhostAnimationController, PlayableGraph, List<GhostPlayableBehaviour>)
Create a playable for this node. The behaviours List must be populated with all GhostPlayableBehaviour which require a call to PreparePredictedData. If a GhostPlayableBehaviour is not added to that list the prediction update will not be called. This can create a GhostPlayableBehaviour which contains mixers, clips, references to other assets etc.
Declaration
public abstract Playable CreatePlayable(GhostAnimationController controller, PlayableGraph graph, List<GhostPlayableBehaviour> behaviours)
Parameters
Type | Name | Description |
---|---|---|
GhostAnimationController | controller | GhostAnimationController to construct playable from. |
PlayableGraph | graph | PlayableGraph used to manage creation and destruction of playables. |
List<GhostPlayableBehaviour> | behaviours | Populated list to call PreparePredictedData(NetworkTick, Single, Boolean) on. |
Returns
Type | Description |
---|---|
Playable | Playable constructed for this node. |
RegisterPlayableData(IRegisterPlayableData)
Register playable data for this asset. Only data registered here can be accessed during PrepareFrame, no other entity data can be accessed.
Declaration
public abstract void RegisterPlayableData(IRegisterPlayableData register)
Parameters
Type | Name | Description |
---|---|---|
IRegisterPlayableData | register | Communicate which components they are using. |