key | 对充当此绑定的键的 UnityEngine.Object 的引用。 |
type | 要绑定到 ScriptPlayableOutput 的对象类型。 |
name | ScriptPlayableOutput 的名称。 |
PlayableBinding 返回包含用于创建 ScriptPlayableOutput 的信息的 PlayableBinding。
创建包含表示 ScriptPlayableOutput 的信息的 PlayableBinding。
using System.Collections.Generic; using UnityEngine; using UnityEngine.Playables;
public class CustomPlayableAsset : PlayableAsset { public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { return Playable.Create(graph); }
public override IEnumerable<PlayableBinding> outputs { get { yield return ScriptPlayableBinding.Create("ScriptPlayableOutput", this, typeof(Renderer)); } } }