From 3af4c218c0e70167db23a6303d2af30aff37d2fe Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 20 Aug 2020 23:40:50 -0400 Subject: Removed a bunch of stuff; Changes --- .../Runtime/Extensions/TrackExtensions.cs | 76 ---------------------- .../Runtime/Extensions/TrackExtensions.cs.meta | 11 ---- 2 files changed, 87 deletions(-) delete mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs delete mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs.meta (limited to 'Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions') diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs deleted file mode 100644 index 87eec1b..0000000 --- a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.Timeline; -using UnityEngine.Playables; - -namespace UnityEngine.Timeline -{ - /// - /// Extension methods for TrackAssets - /// - public static class TrackAssetExtensions - { - /// - /// Gets the GroupTrack this track belongs to. - /// - /// The track asset to find the group of - /// The parent GroupTrack or null if the Track is an override track, or root track. - public static GroupTrack GetGroup(this TrackAsset asset) - { - if (asset == null) - return null; - - return asset.parent as GroupTrack; - } - - /// - /// Assigns the track to the specified group track. - /// - /// The track to assign. - /// The GroupTrack to assign the track to. - /// - /// Does not support assigning to a group in a different timeline. - /// - public static void SetGroup(this TrackAsset asset, GroupTrack group) - { - const string undoString = "Reparent"; - - if (asset == null || asset == group || asset.parent == group) - return; - - if (group != null && asset.timelineAsset != group.timelineAsset) - throw new InvalidOperationException("Cannot assign to a group in a different timeline"); - - - TimelineUndo.PushUndo(asset, undoString); - - var timeline = asset.timelineAsset; - var parentTrack = asset.parent as TrackAsset; - var parentTimeline = asset.parent as TimelineAsset; - if (parentTrack != null || parentTimeline != null) - { - TimelineUndo.PushUndo(asset.parent, undoString); - if (parentTimeline != null) - { - parentTimeline.RemoveTrack(asset); - } - else - { - parentTrack.RemoveSubTrack(asset); - } - } - - if (group == null) - { - TimelineUndo.PushUndo(timeline, undoString); - asset.parent = asset.timelineAsset; - timeline.AddTrackInternal(asset); - } - else - { - TimelineUndo.PushUndo(group, undoString); - group.AddChild(asset); - } - } - } -} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs.meta deleted file mode 100644 index 823e94a..0000000 --- a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d3721d5c6afa8e545995dfaada328476 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: -- cgit v1.2.3