ToggleGroup and ValidateInput are not working together.

Issue #893 resolved
Raimundas Banevicius created an issue

Hi,

Then using ToggleGroup and ValidateInput together Warning/error is not shown in inspector window. (Project validator still reports problem correctly.)

Try sample :

    [ToggleGroup(nameof(CanObscure))]
    [ValidateInput(nameof(ValidateNoRedundantObscureObject), "There is obscure object, but obscure feature is not used. Do we need it?", InfoMessageType.Warning)]
    [SerializeField] private bool CanObscure;

    private bool ValidateNoRedundantObscureObject()
    {
     return false;
    }

Observe : you can’t see warning in inspector.

Proposed solutions :

  • Show warning/error over togleGroup title bar regardles if it's checked or not.
  • Add new feature to ValidateInput : ShowAsTypeInfo : true|false - true would move all warnings to top of inspector. (Similar to TypeInfoBox)

Thanks for your time.

Unity version : 2021.03.13

Comments (1)

  1. Antonio Rafael Antunes Miranda

    Thanks for the report, we’re aware of this issue and have already fixed it. The fix should be included in the upcoming patch that’s about to drop very soon.

  2. Log in to comment