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:
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user