Пример #1
0
    void Start()
    {
        SequencerClip [] clips = GameUtility.allSequencerClips;

        clipButtonList = new SequencerClipLibraryButton [clips.Length];

        SequencerClipLibraryButton currentSCLB = prototype.GetComponent <SequencerClipLibraryButton> ();

        currentSCLB.Initialize(clips [0]);
        clipButtonList [0] = currentSCLB;

        for (int x = 1; x < clips.Length; x++)
        {
            currentSCLB = Instantiate(prototype, transform, true).GetComponent <SequencerClipLibraryButton> ();
            currentSCLB.Initialize(clips [x]);
            clipButtonList [x] = currentSCLB;
        }

        musicSequencer.currentClipSelected = clips [0];
    }
Пример #2
0
 public void PreviewClip(SequencerClipLibraryButton clipButton)
 {
     StopPreview();
     previewAudio.clip = clipButton.sequencerClip.audioClip;
     previewAudio.Play();
 }