Adding Own Rules
There are 2 types of rules you can add.
Here are some example cases that you use component based validation for.
- If you have localization component that has to be attached to every label field in your project, you may validate Text components and check if it has the localization component attached.
- You may want some component not to be used on your scene's MeshCollider for example, so you may create a rule that will look for that component.
- If you want to validate GameObject, for example, you have some structure rules that your scene should follow, in this case, you may create a rule based on the Transform component.
- Or another example you may create your own naming or structure convention for your scene. The simple naming convention is already provided with the plugin as a default validation rule.
Check out code sample for creating sample rules.
Not all cases can be covered with component-based rules, that's why there is a different type of rules you cause. For example, having a particle system or point light on your scene is not an issue at all, but having 100 particles systems should raise some flags for people who work with that scene.
See the code sample how to make a scene context-based rule.