Skip to content

Commit

Permalink
fix towards ToggleObject hang
Browse files Browse the repository at this point in the history
checking initial state of toggleable object, not if the toggleable object is not null. ugh.
  • Loading branch information
winthos committed Feb 8, 2021
1 parent 94ebde2 commit a4bcfa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unity/Assets/Scripts/PhysicsRemoteFPSAgentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5694,7 +5694,7 @@ protected IEnumerator ToggleAndWait(CanToggleOnOff ctof)
bool success = false;


yield return new WaitUntil( () => (ctof != null && ctof.GetiTweenCount() == 0 && ctof == !ctofInitialState));
yield return new WaitUntil( () => (ctof != null && ctof.GetiTweenCount() == 0 && ctof.isOn == !ctofInitialState));
success = true;

if (!success)
Expand Down

0 comments on commit a4bcfa8

Please sign in to comment.