docs.unity3d.com
    目次を表示する/隠す

    Class TimelineAssetExtensions

    A collection of helpers to manipulate TimelineAsset instances.

    Inheritance
    Object
    TimelineAssetExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Sequences.Timeline
    Syntax
    public static class TimelineAssetExtensions

    Methods

    FindDirector(TimelineAsset)

    Finds a PlayableDirector in loaded scenes that references the given TimelineAsset.

    Declaration
    public static PlayableDirector FindDirector(this TimelineAsset timeline)
    Parameters
    Type Name Description
    TimelineAsset timeline

    The instance of TimelineAsset to look for.

    Returns
    Type Description
    PlayableDirector

    Null when no matching PlayableDirector is found.

    GetOrCreateTrack<T>(TimelineAsset, String)

    Gets a track of type T with the specified name. Creates a new track with the specified name if none is found.

    Declaration
    public static T GetOrCreateTrack<T>(this TimelineAsset asset, string name)
        where T : TrackAsset, new()
    Parameters
    Type Name Description
    TimelineAsset asset

    The instance of TimelineAsset to look into.

    String name

    The name the TrackAsset has in Timeline.

    Returns
    Type Description
    T

    A valid instance of a TrackAsset of type T.

    Type Parameters
    Name Description
    T

    The type of the track to look for.

    GetScenes(TimelineAsset)

    Gets a collection of scene paths found in the given timeline.

    Declaration
    public static IReadOnlyCollection<string> GetScenes(this TimelineAsset timeline)
    Parameters
    Type Name Description
    TimelineAsset timeline

    The instance of TimelineAsset this method applies to.

    Returns
    Type Description
    IReadOnlyCollection<String>

    A read only collection of paths, relative to the project folder.

    GetTrack<T>(TimelineAsset, String)

    Gets a track of type T with the specified name.

    Declaration
    public static T GetTrack<T>(this TimelineAsset asset, string name)
        where T : TrackAsset
    Parameters
    Type Name Description
    TimelineAsset asset

    The instance of TimelineAsset to look into.

    String name

    The name the TrackAsset has in Timeline.

    Returns
    Type Description
    T

    Null when no matching track is found.

    Type Parameters
    Name Description
    T

    The type of the track to look for.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)