Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.Playables;
- [System.Serializable]
- public class PositionPlayableAsset : PlayableAsset
- {
- public ExposedReference<GameObject> targetObject;
- public Vector3 startPosition;
- public Vector3 endPosition;
- public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
- {
- var behaviour = new PositionPlayableBehaviour
- {
- targetObject = targetObject.Resolve(graph.GetResolver()),
- startPosition = startPosition,
- endPosition = endPosition
- };
- return ScriptPlayable<PositionPlayableBehaviour>.Create(graph, behaviour);
- }
- }
Add Comment
Please, Sign In to add comment