Last active
April 26, 2017 12:55
-
-
Save tsubaki/c48df410b0ad90b7cc94822c6a38725e to your computer and use it in GitHub Desktop.
resolverによる解決
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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