Class TimelineConversion
Methods used to convert PlayableDirectors and Timelines to Entities.
Namespace: Unity.Timeline.Hybrid
Syntax
public static class TimelineConversion
Methods
Convert(PlayableDirector, Entity, EntityManager, GameObjectConversionSystem)
Converts a playable director. This method will add Timer and corresponding Timer components to the PlayableDirector
Declaration
public static void Convert(PlayableDirector director, Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
Parameters
Type | Name | Description |
---|---|---|
PlayableDirector | director | The PlayableDirector to convert. The gameObject of the PlayableDirector is used as the main conversion target |
Entity | entity | The main entity to convert |
EntityManager | dstManager | The entity manager to use for conversion |
GameObjectConversionSystem | conversionSystem | The conversionSystem to use for conversion |
ConvertPlayableDirector(ConversionContext)
Converts a timeline associated with a PlayableDirector. The playableDirector and TimerEntity must be specified in the context object. This method does not update the playable director.
Declaration
public static void ConvertPlayableDirector(ConversionContext context)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context |
Exceptions
Type | Condition |
---|---|
ArgumentException |
ConvertPlayableDirector(ConversionContext, ActiveRange)
Converts a range of the timeline associated with a PlayableDirector. The playableDirector and TimerEntity must be specified in the context object. This method does not update the playable director.
Declaration
public static void ConvertPlayableDirector(ConversionContext context, ActiveRange range)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context | |
ActiveRange | range | The range of the timeline to convert |
Exceptions
Type | Condition |
---|---|
ArgumentException |
ConvertTimeline(ConversionContext, TimelineAsset)
Converts a timeline asset. The asset may or may not be the same as indicated by the PlayableDirector specified in the timeline
Declaration
public static void ConvertTimeline(ConversionContext context, TimelineAsset timeline)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context | |
TimelineAsset | timeline |
ConvertTimeline(ConversionContext, TimelineAsset, ActiveRange)
Converts a section of a timeline asset. The asset may or may not be the same as indicated by the PlayableDirector specified in the timeline
Declaration
public static void ConvertTimeline(ConversionContext context, TimelineAsset timeline, ActiveRange range)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context | |
TimelineAsset | timeline | |
ActiveRange | range |
ConvertTrack(ConversionContext)
Converts a track. The track is specified in the context object
Declaration
public static void ConvertTrack(ConversionContext context)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context |
ConvertTrack(ConversionContext, ActiveRange)
Converts a track. The track is specified in the context object
Declaration
public static void ConvertTrack(ConversionContext context, ActiveRange range)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context | |
ActiveRange | range |
ConvertTracks(ConversionContext, IEnumerable<DOTSTrack>)
Converts a set of timeline trackto Entities
Declaration
public static void ConvertTracks(ConversionContext context, IEnumerable<DOTSTrack> dotsTracks)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context | The conversion context to use |
IEnumerable<DOTSTrack> | dotsTracks | The list of tracks to convert |
ConvertTracks(ConversionContext, IEnumerable<DOTSTrack>, ActiveRange)
Converts a set of timeline tracks
Declaration
public static void ConvertTracks(ConversionContext context, IEnumerable<DOTSTrack> dotsTracks, ActiveRange range)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context | The conversion context to use |
IEnumerable<DOTSTrack> | dotsTracks | The list of tracks to convert |
ActiveRange | range | The range of the tracks to convert. If the range is larger than the timelines range, it will assume looping |
DeclareReferencedPrefabs(PlayableDirector, List<GameObject>)
Declare referenced prefabs used by a PlayableDirector, and all of it's sub timelines
Declaration
public static void DeclareReferencedPrefabs(PlayableDirector director, List<GameObject> referencedPrefabs)
Parameters
Type | Name | Description |
---|---|---|
PlayableDirector | director | |
List<GameObject> | referencedPrefabs |
DeclareReferencedPrefabs(ConversionContext, TimelineAsset, List<GameObject>)
Declare Referenced Prefabs for a timeline asset
Declaration
public static void DeclareReferencedPrefabs(ConversionContext context, TimelineAsset timeline, List<GameObject> referencedPrefabs)
Parameters
Type | Name | Description |
---|---|---|
ConversionContext | context | |
TimelineAsset | timeline | |
List<GameObject> | referencedPrefabs |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |