Skip to content

Commit

Permalink
Fix optimizer not running when entering playmode a second time when d…
Browse files Browse the repository at this point in the history
…omain reload on play mode is disabled
  • Loading branch information
d4rkc0d3r committed Feb 1, 2025
1 parent f1a85c9 commit 098fc2f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v3.9.6
### Bug Fixes
* Fix optimizer not running when entering playmode a second time when domain reload on play mode is disabled.

## v3.9.5
### Bug Fixes
* Fix `Combine Motion Time Approximation` breaking motion time states that linearly animate euler angles.
Expand Down
5 changes: 5 additions & 0 deletions Editor/AvatarBuildHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public class AvatarBuildHook : IVRCSDKPreprocessAvatarCallback
#endif

static private bool didRunInPlayMode = false;
[InitializeOnEnterPlayMode]
static void OnEnterPlaymodeInEditor(EnterPlayModeOptions options)
{
didRunInPlayMode = false;
}

public bool OnPreprocessAvatar(GameObject avatarGameObject)
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "d4rkpl4y3r.d4rkavataroptimizer",
"displayName": "d4rkAvatarOptimizer",
"version": "3.9.5",
"version": "3.9.6",
"unity": "2019.4",
"description": "An optimizer aiming to reduce mesh & material count and more of VRChat 3.0 avatars.",
"dependencies": {},
Expand Down

0 comments on commit 098fc2f

Please sign in to comment.