1
0
mirror of https://github.com/originalnicodr/CinematicUnityExplorer.git synced 2025-07-18 09:27:57 +08:00

Update individual cell mesh togglers if the global toggler is interacted with.

This commit is contained in:
originalnicodr
2024-08-04 21:33:05 -03:00
parent 8f2ec19660
commit 7a580d12ed
2 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,7 @@ namespace UnityExplorer.UI.Panels
inspectButton.ButtonText.text = animatorPlayer.animator.name;
IgnoreMasterToggle.isOn = animatorPlayer.shouldIgnoreMasterToggle;
animatorToggler.isOn = animatorPlayer.animator.speed != 0;
MeshToggle.isOn = animatorPlayer.IsMeshHidden();
UpdateDropdownOptions();
}

View File

@ -153,6 +153,11 @@ namespace UnityExplorer.UI.Panels
meshRenderer.gameObject.SetActive(value);
}
}
public bool IsMeshHidden(){
// Could maybe save a variable to set on SetMeshesEnabled instead
return skinnedMeshes.Any( m => m.TryCast<Renderer>().enabled) || extraMeshes.Any( m => m.gameObject.activeSelf);
}
}
public class IAnimator