using System; using UnityEngine; using UnityEngine.Playables; namespace Thousandto.Launcher.ExternalLibs { [Serializable] public class ScriptActivationClip : PlayableAsset { public string BehaviourName; public bool NeedSendMessage; public int IntParam; public string StrParam; private ScriptActivationBehaviour template = new ScriptActivationBehaviour(); public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { var playable = ScriptPlayable.Create(graph, template); var behaviour = playable.GetBehaviour(); if (behaviour != null) { behaviour.ScriptName = BehaviourName; behaviour.NeedSendMessage = NeedSendMessage; behaviour.IntParam = IntParam; behaviour.StrParam = StrParam; } return playable; } } }