using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using Object = UnityEngine.Object;
///
/// 对Timeline中的轨道和GameObject进行随机打乱绑定
///
public class TimelineRandomScript : MonoBehaviour
{
//关联的Timeline的控制器
public PlayableDirector director;
private void Awake()
{
if (director == null)
{
director = GetComponent();
}
if (director != null)
{
//把自动播放给关掉,担心在播放中时,换对象,会导致异常出现
director.playOnAwake = false;
}
}
// Start is called before the first frame update
private void Start()
{
if (director == null)
{
director = GetComponent();
}
if (director != null)
{
List