Skip to content

Commit

Permalink
* Fix issue #10: add an additional null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Esska committed Jun 17, 2023
1 parent b26ef08 commit 709d1f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Editor/AV3ObfuscatorEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public override void OnInspectorGUI() {
Animator[] animators = descriptor.GetComponentsInChildren<Animator>(true);

foreach (var item in animators) {

if (item.runtimeAnimatorController == null)
continue;

AnimatorController controller = (AnimatorController)item.runtimeAnimatorController;

foreach (var parameter in controller.parameters) {
Expand Down
2 changes: 1 addition & 1 deletion Editor/Obfuscator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ void ObfuscateControllers(VRCAvatarDescriptor descriptor, Animator animator) {

foreach (var item in animators) {

if (item == animator)
if (item == animator || item.runtimeAnimatorController == null)
continue;

AnimatorController obfuscatedController = ObfuscateController((AnimatorController)item.runtimeAnimatorController);
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": "com.esska.av3obfuscator",
"displayName": "Esska AV3 Obfuscator",
"version": "2.0.6",
"version": "2.0.7",
"unity": "2019.4",
"description": "Esska AV3Obfuscator allows you to obfuscate your VRChat avatar.",
"author": {
Expand Down

0 comments on commit 709d1f0

Please sign in to comment.