Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Timeline;
public class Rotation : MonoBehaviour, ITimeControl {
[SerializeField] Vector3 axis = Vector3.up;
[SerializeField] float speed = 1;
// 何度も呼ばれる
public void SetTime (double time)
transform.localRotation = Quaternion.AngleAxis (((float) time) * speed, axis);
// クリップ開始時に呼ばれる
public void OnControlTimeStart ()
// クリップから抜ける時に呼ばれる
public void OnControlTimeStop ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment