Instantly share code, notes, and snippets.

Embed
What would you like to do?
resolverによる解決
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
[System.Serializable]
public class TextUpdateAsset : PlayableAsset
{
public override PlayableHandle CreatePlayable (PlayableGraph graph, GameObject go)
{
var handle = graph.CreateScriptPlayable<TextUpdatePlayable> ();
bool result;
handle.GetObject<TextUpdatePlayable> ().text = (UnityEngine.UI.Text)graph.resolver.GetReferenceValue ("title", out result);
return handle;
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.UI;
public class SetResolve : MonoBehaviour
{
[SerializeField] PlayableDirector playableDirector;
[SerializeField] Text label;
void Start ()
{
playableDirector.SetReferenceValue ("title", label);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment