Skip to content

Commit 09790c6

Browse files
David Klinekeveleigh
authored andcommitted
Merge pull request #10331 from davidkline-ms/bpSolverWarning
Backport recent v3 update to reduce debug log spam
1 parent 8a64b4f commit 09790c6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Assets/MRTK/SDK/Features/Utilities/Solvers/HandConstraint.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public override void SolverUpdate()
263263
if (SolverHandler.TrackedTargetType != TrackedObjectType.HandJoint &&
264264
SolverHandler.TrackedTargetType != TrackedObjectType.ControllerRay)
265265
{
266-
Debug.LogWarning("Solver HandConstraint requires TrackedObjectType of type HandJoint or ControllerRay");
266+
// Requires HandJoint or ControllerRay target type.
267267
return;
268268
}
269269

@@ -705,6 +705,12 @@ protected override void OnEnable()
705705
trackedController = null;
706706
OnLastHandLost.Invoke();
707707
OnHandDeactivate.Invoke();
708+
709+
if (SolverHandler.TrackedTargetType != TrackedObjectType.HandJoint &&
710+
SolverHandler.TrackedTargetType != TrackedObjectType.ControllerRay)
711+
{
712+
Debug.LogWarning("Solver HandConstraint requires TrackedObjectType of type HandJoint or ControllerRay.");
713+
}
708714
}
709715

710716
#endregion MonoBehaviour Implementation

0 commit comments

Comments
 (0)