mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-30 18:22:52 +08:00
fix: MA Menu Item was showing a spurious gizmo icon
Fix this for new components as well by using reflection to find all avatar tag components and remove the gizmos appropriately.
This commit is contained in:
parent
d5c2b98a05
commit
095c2667a0
@ -125,17 +125,16 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
return;
|
||||
}
|
||||
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarBoneProxy), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarBoundsOverride), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarBoundsOverrideBlocker), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarProbeAnchor), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarBlendshapeSync), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarMenuInstaller), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarMergeAnimator), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarMergeArmature), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarParameters), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarPBBlocker), false);
|
||||
SetGizmoIconEnabled(typeof(ModularAvatarVisibleHeadAccessory), false);
|
||||
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
foreach (var ty in assembly.GetTypes())
|
||||
{
|
||||
if (typeof(AvatarTagComponent).IsAssignableFrom(ty) && !ty.IsAbstract)
|
||||
{
|
||||
SetGizmoIconEnabled(ty, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorApplication.update -= DisableMAGizmoIcons;
|
||||
SessionState.GetBool("MAIconsDisabled", true);
|
||||
|
Loading…
Reference in New Issue
Block a user