Skip to content

Commit

Permalink
FakeWDの修正
Browse files Browse the repository at this point in the history
UnhumanoidDuration=0
  • Loading branch information
pandrabox committed Sep 22, 2024
1 parent d43572e commit 01938be
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Editor/CreateClip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private AnimationClip CreateFakeWriteDefaultClip(AnimationClip fromClip)
float currentValue;
AnimationUtility.GetFloatValue(Descriptor.gameObject, binding, out currentValue);
Keyframe keyframe1 = new Keyframe(0, currentValue);
Keyframe keyframe2 = new Keyframe((_unit.TransitionInfo.ManualExit.Duration + 0.3f) / 60f, currentValue);
Keyframe keyframe2 = new Keyframe(4f / 60f, currentValue); // あまり根拠はないが気持ち伸ばす
AnimationCurve curve = new AnimationCurve(keyframe1, keyframe2);
AnimationUtility.SetEditorCurve(clip, binding, curve);
}
Expand Down
6 changes: 3 additions & 3 deletions Editor/StateMachineWriterEmoteUnHumanoid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ protected override void CreateTransition()
var wdState = GetState("W", _nEmote);
var nextState = GetState("E", _nEmote, _nChain + 1) ?? wdState;
StartTransition(_initialState, currentState, _trans.Start);
OneshotTransition(currentState, nextState, _trans.AutoExit);
ManualExitTransition(currentState, nextState, _trans.ManualExit);
ForceExitTransition(currentState, wdState, _trans.Sit);
OneshotTransition(currentState, nextState, TransitionInfo.HasQuick);
ManualExitTransition(currentState, nextState, TransitionInfo.Quick);
ForceExitTransition(currentState, wdState, TransitionInfo.Quick);
if (_nChain==0) WDExitTransition(wdState, _exitState, TransitionInfo.HasQuick);
}
else
Expand Down
6 changes: 3 additions & 3 deletions Editor/StateMachineWriterEmoteUnHumanoidRelative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ protected override void CreateTransition()
var wdState = GetState("W", _nEmote);
var nextState = GetState("E", _nEmote, _nChain + 1) ?? wdState;
StartTransition(_initialState, currentState, _trans.Start);
OneshotTransition(currentState, nextState, _trans.AutoExit);
ManualExitTransition(currentState, nextState, _trans.ManualExit);
ForceExitTransition(currentState, wdState, _trans.Sit);
OneshotTransition(currentState, nextState, TransitionInfo.HasQuick);
ManualExitTransition(currentState, nextState, TransitionInfo.Quick);
ForceExitTransition(currentState, wdState, TransitionInfo.Quick);
if (_nChain==0) WDExitTransition(wdState, _exitState, TransitionInfo.HasQuick);
}
else
Expand Down
5 changes: 3 additions & 2 deletions Runtime/Config.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="Config.cs" ></copyright>
#if UNITY_EDITOR

using System.Collections.Generic;
using static com.github.pandrabox.emoteprefab.runtime.TransitionInfo;
Expand Down Expand Up @@ -130,4 +130,5 @@ public static class Config
/* For Reviwer
* Please review this code for each element and identify areas for improvement, providing a final score out of 100.
* Please review this code in Japanese.
*/
*/
#endif
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.github.pandrabox.emoteprefab",
"version": "1.3.1",
"version": "1.3.2",
"displayName": "EmotePrefab",
"author": {
"name": "pandra"
Expand Down

0 comments on commit 01938be

Please sign in to comment.