Created
September 22, 2017 13:29
-
-
Save tsubaki/35eb8176f38c95028fc3a5b7db3c3a21 to your computer and use it in GitHub Desktop.
もっと簡単な動的なバインド(Control Playable Asset Clipのみ)
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; | |
public class EasyRebind : MonoBehaviour | |
{ | |
[SerializeField] Transform bindedTransform; | |
public void Play (Rotation rotation) | |
{ | |
rotation.transform.parent = bindedTransform; | |
var director = GetComponent<PlayableDirector> (); | |
director.Play (); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment