Ejemplo n.º 1
0
//----------------------------------------------------------------------------------------------------------------------    
    /// <inheritdoc/>
    public override void OnCreate(TimelineClip clip, TrackAsset track, TimelineClip clonedFrom) {
                
        SceneCachePlayableAsset asset = clip.asset as SceneCachePlayableAsset;
        if (null == asset) {
            Debug.LogError("[MeshSync] Asset is not a SceneCachePlayableAsset: " + clip.asset);
            return;
        }
        
        //Track can be null during copy and paste
        if (null != track) {
            //This callback occurs before the clip is assigned to the track, but we need the track for creating curves.
            clip.TryMoveToTrack(track);
        }

        asset.Init(updateClipDurationOnCreatePlayable: null == clonedFrom);
    }