Install Odin Inspector as a Unity package

If desirable, you can install Odin in your project as a Unity package. Some advantages of this are that you can have Odin installed at just one location on your computer and leave you with less clutter in your project.

You can follow the steps below to install Odin through the package manager successfully:

Installing Odin from a GIT repository is currently not officially supported because the repository will be read only and therefore the assembly upgrader is not run, and any Odin features relying on write access will break.

  1. Make a folder anywhere that is outside the Assets folder, and create a package.json file inside it:

    {
        "name": "odininspector",
        "displayName": "OdinInspector",
        "version": "3.0.6",
        "unity": "2018.3",
        "description": "Odin puts your Unity workflow on steroids, making it easy to build powerful and advanced user-friendly editors for you and your entire team. With an effortless integration that deploys perfectly into pre-existing workflows, Odin allows you to serialize anything and enjoy Unity with 80+ new inspector attributes, no boilerplate code and so much more!",
        "keywords": [
        ],
        "category": "Unity"
    }
    

    ( Remember to update the version field to whatever version of Odin you are installing as a package. )

  2. Copy over the Sirenix folder and put that in there as well.

  3. Open the package manager and find the Add Package From Disk button. (The plus button at the top left of the package manager window.)

  1. If you are not running Odin in Editor Only Mode, create a new file called link.xml somewhere in your project under the Assets folder, and add the following contents to the file:

    <linker>
           <assembly fullname="Sirenix.OdinInspector.Attributes" preserve="all"/>
           <assembly fullname="Sirenix.Serialization.Config" preserve="all"/>
           <assembly fullname="Sirenix.Serialization" preserve="all"/>
           <assembly fullname="Sirenix.Utilities" preserve="all"/>
           <assembly fullname="Sirenix.Serialization.AOTGenerated" preserve="all" ignoreIfMissing="1"/>
    </linker>
    

    This step will ensure that Odin's assemblies are not stripped by Unity on AOT platforms (stripping will break Odin's serializer), and is necessary because Unity does not support link.xml files in packages and so will ignore the link.xml files included in the Odin package by default (see Unity's docs).

When installing Odin this way keep in mind that different projects using different Unity versions will each need separate folders.

Each Unity version will run the assembly upgrader when loading the Odin package and this will, therefore, cause issues if the package is shared between different Unity versions.