Question by
paulsz · Mar 03, 2016 at 09:01 AM ·
animationtimeexecuteineditmode
Can you set animation time of an animation in editor mode ?
We use a script that uses [ExecuteInEditMode] and in update we want to do something like this
[SerializeField] Animation animtn;
[SerializeField] float debugTime = 0;
void Update()
{
if (!Application.isPlaying)
{
animtn["cameraAnimationTest"] = debugTime;
}
}
we want to use the debugTime exposed in the script to set the time of the animation and see the object move accordingly.
Is this possible at all or we have to use a different approach ?
We want to use debugTime because we have other scripts that use that time and see them all sync in the editor (including the Animation).
Thanks alot :D
Comment