目录
一、脚本事件运用
Add添加Playable Track轨道,在后面的轨道中右键会有Event System Playable文本显示,点击创建。
代码部分:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
//Timeline脚本事件运用
public class EventSystemPlayable : PlayableAsset
{
public string eventId;
public string param;
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
{
var playable = ScriptPlayable<NewPlayableBehaviour>.Create(graph