Skip to content

Commit a922433

Browse files
committed
LateUpdate実装
1 parent 8213aff commit a922433

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

EVMC4U/ExternalReceiver.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ public class ExternalReceiver : MonoBehaviour, IExternalReceiver
117117
#else
118118
[Header("Other Option")]
119119
#endif
120+
[SerializeField, Label("更新タイミングをLateUpdateにする(Animationの後に実行して上書きする)")]
121+
public bool EnableLateUpdateForOverwriteAnimationResult = false; //LateUpdateにするかどうか(Animationの後に実行して上書きする)
120122
[SerializeField, Label("未キャリブレーション時にモデルを隠す")]
121123
public bool HideInUncalibrated = false; //キャリブレーション出来ていないときは隠す
122124
[SerializeField, Label("MRモード連動")]
@@ -440,6 +442,23 @@ public float GetRemoteTime()
440442
}
441443

442444
public void Update()
445+
{
446+
// 毎フレーム更新処理(前)
447+
if (!EnableLateUpdateForOverwriteAnimationResult)
448+
{
449+
Process();
450+
}
451+
}
452+
public void LateUpdate()
453+
{
454+
// 毎フレーム更新処理(後)
455+
if (EnableLateUpdateForOverwriteAnimationResult)
456+
{
457+
Process();
458+
}
459+
}
460+
461+
public void Process()
443462
{
444463
//エラー・無限ループ時は処理をしない
445464
if (shutdown) { return; }

0 commit comments

Comments
 (0)