Skip to content

Commit

Permalink
🐛 fix(synced-float): Fix clamp & decrement
Browse files Browse the repository at this point in the history
  • Loading branch information
esnya committed Jun 24, 2022
1 parent 1303062 commit 8c6e5e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions Packages/com.nekometer.esnya.inari-udon/Sync/SyncedFloat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ private float Value
{
_value = clampValue ? Mathf.Clamp(value, minValue, maxValue) : value;
if (slider) slider.value = exp ? Mathf.Log(_value) : _value;

if (writeProgramVariables) WriteProgramVariables(value);
if (writeAnimatorParameters) WriteAnimatorParameters(value);
if (writeProgramVariables) WriteProgramVariables(_value);
if (writeAnimatorParameters) WriteAnimatorParameters(_value);
}
get => _value;
}
Expand Down Expand Up @@ -271,7 +270,7 @@ public void _Increment()
public void _Decrement()
{
_TakeOwnership();
Value += incrementStep;
Value -= incrementStep;
}

#if !COMPILER_UDONSHARP && UNITY_EDITOR
Expand Down

0 comments on commit 8c6e5e8

Please sign in to comment.