Skip to content

Commit

Permalink
Merge branch 'feature' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
renanwolf committed May 18, 2021
2 parents 1755533 + 294a08f commit 3ad12cd
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [2.2.1] - 2021-05-18
### Fixed
- `RateRequestAnimatorComponent` was not evaluating correctly if `Animator` states are playing.

## [2.2.0] - 2021-01-20
### Added
- `RateRequestAnimationComponent` to activate requests while an `Animation` component is playing.
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Components/RateRequestAnimatorComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ private bool GetIsAnimatorInTransitionAtLayer(Animator animator, int layerIndex)
private bool GetIsAnimatorPlayingInStateAtLayer(Animator animator, int layerIndex, int stateHash, bool hasStateHash) {
var stateInfo = animator.GetCurrentAnimatorStateInfo(layerIndex);
if (stateInfo.speed == 0f || stateInfo.speedMultiplier == 0f) return false;
if (!hasStateHash) return true;
return (stateInfo.shortNameHash == stateHash);
if (hasStateHash && stateInfo.shortNameHash != stateHash) return false;
return (stateInfo.loop || stateInfo.normalizedTime < 1f);
}

private bool GetIsAnimatorPlayingOrInTransition(Animator animator, string layerName, int stateHash, bool hasStateHash, bool activateRequestsInTransitions) {
Expand Down
Binary file removed UniRate_v2.2.0.unitypackage
Binary file not shown.
Binary file added UniRate_v2.2.1.unitypackage
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.pflowr.unirate",
"displayName": "UniRate",
"version": "2.2.0",
"version": "2.2.1",
"unity": "2018.3",
"description": "A great solution to manage frame rate and rendering interval to save device power, especially on mobile platforms.\nYou can control the update rate, fixed update rate and render interval (Unity 2019.3 or newer) from everywhere in your code without worrying about multiple requests, UniRate will take care of all of them for you.",
"author": {
Expand Down

0 comments on commit 3ad12cd

Please sign in to comment.