{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class TrackAction | Timeline | 1.5.0-preview.5
docs.unity3d.com
"{0}" の検索結果

    目次を表示する/隠す

    Class TrackAction

    Base class for a track action. Inherit from this class to make an action that would react on selected tracks after a menu click and/or a key shortcut.

    Inheritance
    object
    TrackAction
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEditor.Timeline.Actions
    Assembly: solution.dll
    Syntax
    [ActiveInMode(TimelineModes.Default)]
    public abstract class TrackAction
    Remarks

    To add an action as a menu item in the Timeline context menu, add MenuEntryAttribute on the action class. To make an action to react to a shortcut, use the Shortcut Manager API with TimelineShortcutAttribute. ShortcutAttribute

    Examples

    Simple track Action example (with context menu and shortcut support).

    [MenuEntry("Custom Actions/Sample track Action")]
    public class SampleTrackAction : TrackAction
    {
        public abstract ActionValidity Validate(IEnumerable<TrackAsset> items)
        {
           return ActionValidity.Valid;
        }
    
        public override bool Execute(IEnumerable<TrackAsset> items)
        {
            Debug.Log("Test Action");
            return true;
        }
    
        [TimelineShortcut("SampleTrackAction", KeyCode.K), UsedImplicitly]
        public static void HandleShortCut(ShortcutArguments args)
        {
            Action.InvokeWithSelectedTracks<SampleTrackAction> ();
        }
    }

    Methods

    Name Description
    Execute(IEnumerable<TrackAsset>)

    Execute the action.

    Validate(IEnumerable<TrackAsset>)

    Defines the validity of an Action for a given set of tracks.

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