Hi, is there a way to turn on and off Rig Effectors gizmos on the scene view, the same way you can show and hide all gizmos?
i was confused about this for so long, but you can press the “eye” icon in the hierarchy view and hide them this way. It’s not always ideal but I’ve come to appreciate the extra control it gives
Thank you, I forgot about that. And for me it’s more than enough.
I’d love to follow up on this.
Because I have a scene with hundreds of effectors and would love a simple toggle to turn them all on/off. I built a editor script to hide all the bone renderers simply enough, but the effectors don’t have a component added to their gameobjects that would make them easily findable in code… Any help would be great!
Adding a photo to help out. Specifically looking for a way to toggle this highlighted checkbox on ALL “effectors” in a scene.
Probably should have waited before posting this… because I figured it out! Here’s the code in case anyone in the future needs this. (Includes the Bone Hide function as well)
using UnityEditor;
using UnityEngine.Animations.Rigging;
using UnityEditor.SceneManagement;
public class BoneHider : ScriptableWizard
{
[MenuItem("Animation Rigging/Toggle Bones")]
public static void ToggleBones()
{
BoneRenderer[] bones = FindObjectsOfType<BoneRenderer>();
foreach (var bone in bones)
{
bone.enabled = !bone.enabled;
}
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
}
[MenuItem("Animation Rigging/Toggle Effectors")]
public static void ToggleEffectors()
{
Rig[] rigs = FindObjectsOfType<Rig>();
foreach (var rig in rigs)
{
var enumerator = rig.effectors.GetEnumerator();
while (enumerator.MoveNext())
{
enumerator.Current.visible = !enumerator.Current.visible;
}
}
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
}
}