public void OnEnable()
 {
     if (target != null)
     {
         m_object = target as CriAtomTrack;
     }
 }
        public override void DrawBackground(TimelineClip clip, ClipBackgroundRegion region)
        {
            base.DrawBackground(clip, region);
#if CRI_TIMELINE_ATOM_VERBOSE_DEBUG
            Debug.Log("[CRIWARE][Timeline] DrawBackground");

            Debug.Log("region.startTime : " + region.startTime.ToString() + "region.endTime : " + region.endTime.ToString());
#endif

            CriAtomClip atomClip = clip.asset as CriAtomClip;
            CriAtomClipWaveformPreviewer atomClipPreviewer;
            if (!atomClipPreviewDirectory.TryGetValue(atomClip, out atomClipPreviewer))
            {
#if CRI_TIMELINE_ATOM_VERBOSE_DEBUG
                Debug.LogError("[CRIWARE][Timeline] not contains key : " + clip.displayName);
#endif
                return;
            }
            if (!atomClipPreviewer.HasDecodeTask())
            {
                atomClipPreviewDirectory.Remove(atomClip);
                atomClipPreviewDirectory.Add(atomClip, new CriAtomClipWaveformPreviewer(atomClip));
            }

            if (!atomClipPreviewer.HasPreviewData())
            {
                /* While decoding or decode error. Skip renderring. */
                return;
            }

            atomClipPreviewer.IsLooping = atomClip.loopWithinClip;
            atomClipPreviewer.IsMuted   = atomClip.muted;
            CriAtomTrack atomTrack = clip.parentTrack as CriAtomTrack;
            if (atomTrack.m_IsRenderMono)
            {
                atomClipPreviewer.ChannelMode = CriAtomClipWaveformPreviewer.RenderChannelMode.Mono;
            }
            else
            {
                atomClipPreviewer.ChannelMode = CriAtomClipWaveformPreviewer.RenderChannelMode.All;
            }

            atomClipPreviewer.RenderMaterial(region);
        }