using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Playables; using UnityEngine.UI; [System.Serializable] public class PlayableAssetInteractiveSelection : PlayableAsset { public ExposedReference selectionText; public string textStr; public int nextInteractiveSelectionId; // Factory method that generates a playable based on this asset public override Playable CreatePlayable(PlayableGraph graph, GameObject go) { PlayableBehaviourInteractiveSelection selectionPlayable = new PlayableBehaviourInteractiveSelection(); selectionPlayable.Init(selectionText.Resolve(graph.GetResolver()), textStr, nextInteractiveSelectionId); return ScriptPlayable.Create(graph, selectionPlayable, nextInteractiveSelectionId); } }