mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-19 17:22:37 +08:00
fix: reset time button does not work correctly in the inspector when UIEffectTweener.direction=Reverse in the editor
close #310
This commit is contained in:
@@ -77,7 +77,7 @@ namespace Coffee.UIEffects.Editors
|
||||
var rResetTimeButton = new Rect(r.x, r.y, 20, r.height);
|
||||
if (GUI.Button(rResetTimeButton, EditorGUIUtility.IconContent("animation.firstkey"), "IconButton"))
|
||||
{
|
||||
SetTime(0);
|
||||
ResetTime();
|
||||
}
|
||||
|
||||
var rPlayButton = new Rect(r.x + 20, r.y, 20, r.height);
|
||||
@@ -149,6 +149,14 @@ namespace Coffee.UIEffects.Editors
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetTime()
|
||||
{
|
||||
foreach (var tweener in targets.OfType<UIEffectTweener>())
|
||||
{
|
||||
tweener.ResetTime(tweener.direction);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPlaying(bool enable)
|
||||
{
|
||||
if (!EditorApplication.isPlaying)
|
||||
|
||||
Reference in New Issue
Block a user