From c291169761f804ed498024f9ae3538aa1f1e77f3 Mon Sep 17 00:00:00 2001 From: hecomi Date: Fri, 6 Jan 2023 23:07:58 +0900 Subject: [PATCH] consider clipIn and timescale in timeline setup helper. --- .../Timeline/uLipSyncTimelineSetupHelper.cs | 2 + .../Samples/06. Timeline/Timeline.playable | 84 ++++++++----------- 2 files changed, 35 insertions(+), 51 deletions(-) diff --git a/Assets/uLipSync/Editor/Timeline/uLipSyncTimelineSetupHelper.cs b/Assets/uLipSync/Editor/Timeline/uLipSyncTimelineSetupHelper.cs index 5fe747f..4f326f5 100644 --- a/Assets/uLipSync/Editor/Timeline/uLipSyncTimelineSetupHelper.cs +++ b/Assets/uLipSync/Editor/Timeline/uLipSyncTimelineSetupHelper.cs @@ -124,6 +124,8 @@ void OnWizardOtherButton() lipsyncClip.displayName = audioClip.displayName; lipsyncClip.start = audioClip.start; lipsyncClip.duration = audioClip.duration; + lipsyncClip.clipIn = audioClip.clipIn; + lipsyncClip.timeScale = audioClip.timeScale; var lipsyncClipAsset = lipsyncClip.asset as Timeline.uLipSyncClip; diff --git a/Assets/uLipSync/Samples/06. Timeline/Timeline.playable b/Assets/uLipSync/Samples/06. Timeline/Timeline.playable index cdc2726..50c9c8e 100644 --- a/Assets/uLipSync/Samples/06. Timeline/Timeline.playable +++ b/Assets/uLipSync/Samples/06. Timeline/Timeline.playable @@ -24,7 +24,7 @@ MonoBehaviour: - m_Version: 1 m_Start: 2.0833333333333335 m_ClipIn: 0 - m_Asset: {fileID: 987254983362623525} + m_Asset: {fileID: -3594420794378161165} m_Duration: 2.7565078735351567 m_TimeScale: 1 m_ParentTrack: {fileID: -8863445692703013094} @@ -93,7 +93,7 @@ MonoBehaviour: - m_Version: 1 m_Start: 6.016666666666667 m_ClipIn: 0 - m_Asset: {fileID: -687985189067071109} + m_Asset: {fileID: -1205239120068794247} m_Duration: 2.647074829931973 m_TimeScale: 1 m_ParentTrack: {fileID: -8863445692703013094} @@ -259,25 +259,7 @@ MonoBehaviour: m_RotationOrder: 4 m_MixOutCurve: serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 + m_Curve: [] m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 @@ -395,6 +377,21 @@ MonoBehaviour: m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1} m_Rotation: {x: 0, y: 0, z: 0, w: 1} m_ApplyOffsets: 0 +--- !u!114 &-3594420794378161165 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a26d8e83b7dde433fa66b6cb4b73fae5, type: 3} + m_Name: uLipSyncClip + m_EditorClassIdentifier: + bakedData: {fileID: 11400000, guid: 5c100bdf4c65f4026b28a10c73c2def3, type: 2} + volume: 1 + timeOffset: 0 --- !u!114 &-1620895512016643328 MonoBehaviour: m_ObjectHideFlags: 1 @@ -417,6 +414,21 @@ MonoBehaviour: m_Loop: 0 m_Version: 1 m_Rotation: {x: 0, y: 0, z: 0, w: 1} +--- !u!114 &-1205239120068794247 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a26d8e83b7dde433fa66b6cb4b73fae5, type: 3} + m_Name: uLipSyncClip + m_EditorClassIdentifier: + bakedData: {fileID: 11400000, guid: 378122b788ffb43b8b416fc3a37497f4, type: 2} + volume: 1 + timeOffset: 0 --- !u!114 &-859302983170443587 MonoBehaviour: m_ObjectHideFlags: 1 @@ -458,21 +470,6 @@ MonoBehaviour: m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1} m_Rotation: {x: 0, y: 0, z: 0, w: 1} m_ApplyOffsets: 0 ---- !u!114 &-687985189067071109 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a26d8e83b7dde433fa66b6cb4b73fae5, type: 3} - m_Name: uLipSyncClip - m_EditorClassIdentifier: - bakedData: {fileID: 11400000, guid: 378122b788ffb43b8b416fc3a37497f4, type: 2} - volume: 1 - timeOffset: 0 --- !u!114 &-335420224218966511 MonoBehaviour: m_ObjectHideFlags: 1 @@ -519,21 +516,6 @@ MonoBehaviour: m_ScenePreview: 1 m_DurationMode: 0 m_MarkerTrack: {fileID: 0} ---- !u!114 &987254983362623525 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a26d8e83b7dde433fa66b6cb4b73fae5, type: 3} - m_Name: uLipSyncClip - m_EditorClassIdentifier: - bakedData: {fileID: 11400000, guid: 5c100bdf4c65f4026b28a10c73c2def3, type: 2} - volume: 1 - timeOffset: 0 --- !u!114 &2051193541619233645 MonoBehaviour: m_ObjectHideFlags: 1