Getting started with Odin Project Validator

After you've downloaded the Odin Validator unitypackage from odininspector.com/download and imported it into your project, simply go to Tools > Odin Project Validator, select a profile to run, and click the green "Run X" button in the top right, where X is the name of the profile. The validator will run a scan using the profile, and then present the results to you. You can view all scanned objects in the left tree view, and you can view all results in the bottom result overview, which is searchable, and sortable by column. The right part of the window displays the relevant scanned object for the currently selected result or tree view entry, for quick and easy editing.

That's all there is to it! Now you can easily go through all the validation results, and make any corrections that are needed.

Validating ScriptableObjects and Components

Odin Validator comes with built-in support for the following validation attributes.

An example of a properly validated component might look like this:

public class MyComponent : MonoBehaviour
{
    [Required]
    public string Name;

    [AssetsOnly, AssetSelector, Required]
    public GameObject Prefab;

    [ChildGameObjectsOnly, Required]
    public GameObject Child;

    [ValidateInput("@OddNumber % 2 == 1", "@OddNumber + \" is too normal!\"")]
    public int OddNumber;
}

When used diligently throughout your project, Odin Project Validator makes it easier to onboard new team members, and helps keeps your project stable as it grows and changes.

Learn more about how to use Odin Project Validator:

Create your own validators

Create your own validators to add custom validation attributes or define global project-wide rules for how your project should be set up.

Creating Custom Validators

Validation profiles explained

Run various validation profiles to stay on top of your project, however complex it grows.


Odin Validation Profiles explained

Running a validation profile from code

Integrate project validation into your own code. Run it from your custom build process, from your testing framework, on your build serve,r or wherever else you want to.

Running a Validation Profile from code

Creating a custom validation profile

Learn to create your own custom validation profiles to suit your project's exact needs, however exotic they may be.


Creating a custom Validation Profile