Understanding Ignore

Automatic validation can't be precise for all the corner cases. That's why there is an ability to "mute" the specific validation rule for a specific component. Just press the "Ignore" button. See the screenshot below.

In this article, I will describe what is happening under the hood when you are pressing the "Ignore" button. A component rule can be ignored in 2 cases. 

  • The component is part of the scene file. With a mean, you can't ignore component rule for component while it's not part of the saved scene file. 
  • The component is part of a prefab.

Ignoring Component on a Scene. 

In this case, only a specific rule for specific component will be muted. The plugin will create scene ignore configuration and will store it in a text file, that will be named as scene_name + scene_guid. When a scene is renamed or deleted, the configuration file will be renamed and deleted as well. 

Ignoring Component on a Prefab. 

In this case, a rule will be muted for all prefab component instances. The plugin will create a prefab configuration and will store it in a text file, that will be named as prefab_name + prefab_guid. When a prefab is renamed or deleted, the configuration file will be renamed and deleted as well. 

Allow Ignore

You can define globally if you want to enable or disable Ignore option for a plugin inside the Settings Tab.

On top of that, when you extending your rule from SV_ValidationRule you may override CanBeIgnored property if you want to disable ignore options for this rule. See the example below:

using SA.Productivity.SceneValidator;
...

public class SV_SpriteRendererCompatibilityRule : SV_ValidationRule<SpriteRenderer>
{
    ...
    //Validation code
    ...
    public override bool CanBeIgnored {
        get {
            return false;
        }
    }
}