@Override
    public int compareTo(UnityVersion that) {
        if (!this.isValid() && !that.isValid()) {
            return this.raw.compareTo(that.raw);
        }

        if (this.major < that.major) {
            return 1;
        } else if (this.major > that.major) {
            return -1;
        } else {
            if (this.minor < that.minor) {
                return 1;
            } else if (this.minor > that.minor) {
                return -1;
            } else {
                if (this.patch < that.patch) {
                    return 1;
                } else if (this.patch > that.patch) {
                    return -1;
                } else {
                    return this.build.compareTo(that.build);
                }
            }
        }
    }
Unity engine version string container.

@author Nico Bergemann <barracuda415 at yahoo.de>
disunity-core/src/main/java/info/ata4/junity/UnityVersion.java