Skip to content

Commit

Permalink
LateUpdate実装
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsnmeajp committed Mar 16, 2024
1 parent 8213aff commit a922433
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions EVMC4U/ExternalReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public class ExternalReceiver : MonoBehaviour, IExternalReceiver
#else
[Header("Other Option")]
#endif
[SerializeField, Label("更新タイミングをLateUpdateにする(Animationの後に実行して上書きする)")]
public bool EnableLateUpdateForOverwriteAnimationResult = false; //LateUpdateにするかどうか(Animationの後に実行して上書きする)
[SerializeField, Label("未キャリブレーション時にモデルを隠す")]
public bool HideInUncalibrated = false; //キャリブレーション出来ていないときは隠す
[SerializeField, Label("MRモード連動")]
Expand Down Expand Up @@ -440,6 +442,23 @@ public float GetRemoteTime()
}

public void Update()
{
// 毎フレーム更新処理(前)
if (!EnableLateUpdateForOverwriteAnimationResult)
{
Process();
}
}
public void LateUpdate()
{
// 毎フレーム更新処理(後)
if (EnableLateUpdateForOverwriteAnimationResult)
{
Process();
}
}

public void Process()
{
//エラー・無限ループ時は処理をしない
if (shutdown) { return; }
Expand Down

0 comments on commit a922433

Please sign in to comment.