Esempio n. 1
0
 private void InitData()
 {
     if (Target == null)
     {
         return;
     }
     this.ListClip.Clear();
     foreach (var clip in Target.listClips)
     {
         EditorClip eclip = new EditorClip();
         eclip.name = clip.name;
         eclip.SetParam("detialName", clip.detialName);
         eclip.SetParam("param", clip.param);
         eclip.SetParam("loop", clip.loop.ToString());
         eclip.SetParam("length", clip.length.ToString());
         foreach (var clipevent in clip.clipEvents)
         {
             EditorClipEvent ece = new EditorClipEvent();
             ece.name        = clipevent.name;
             ece.triggerTime = clipevent.trigger;
             ece.SetParam("rate", clipevent.rate.ToString());
             ece.SetParam("param", clipevent.param);
             eclip.ListClipEvent.Add(ece);
         }
         this.ListClip.Add(eclip);
     }
 }
Esempio n. 2
0
    protected void InitData()
    {
        if (Target == null)
        {
            return;
        }
        this.ListClip.Clear();
        var animatorListClips = Target.animator.listClips;

        foreach (var clip in animatorListClips)
        {
            EditorClip eclip = new EditorClip();
            eclip.name = clip.name;
            eclip.SetParam("clipName", clip.clipName);
            eclip.SetParam("param", clip.param);
            eclip.SetParam("length", clip.length.ToString());
            eclip.SetParam("speed", clip.speed.ToString());
            eclip.SetParam("fadeFactor", clip.fadeFactor.ToString());
            eclip.SetParam("wrapMode", clip.wrapMode.ToString());
            eclip.SetParam("crossMode", clip.crossMode.ToString());
            foreach (var clipevent in clip.clipEvents)
            {
                EditorClipEvent ece = new EditorClipEvent();
                ece.name        = clipevent.name;
                ece.triggerTime = clipevent.trigger;
                ece.SetParam("param", clipevent.param);
                eclip.ListClipEvent.Add(ece);
            }
            this.ListClip.Add(eclip);
        }
    }