Skip to content

Commit

Permalink
fix beta vrc sdk incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rkc0d3r committed Apr 28, 2023
1 parent e2a117c commit 93adcbb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v2.1.1
### Bug Fixes
* Fix VRChat beta sdk incompatibility because of `GameObject.GetOrAddComponent()` moving namespaces.

## v2.1.0
### Features
* Add option to keep MMD blendshapes intact. [(more)](https://github.com/d4rkc0d3r/d4rkAvatarOptimizer/issues/32)
Expand Down
6 changes: 5 additions & 1 deletion Editor/d4rkAvatarOptimizerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ private static void AssignNewAvatarIDIfEmpty()
var avDescriptor = optimizer.GetComponent<VRCAvatarDescriptor>();
if (avDescriptor == null)
return;
var pm = optimizer.gameObject.GetOrAddComponent<VRC.Core.PipelineManager>();
var pm = optimizer.GetComponent<VRC.Core.PipelineManager>();
if (pm == null)
{
pm = optimizer.gameObject.AddComponent<VRC.Core.PipelineManager>();
}
if (!string.IsNullOrEmpty(pm.blueprintId))
return;
pm.AssignId();
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": "2.1.0",
"version": "2.1.1",
"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 93adcbb

Please sign in to comment.