Skip to content

Class AudityVersion

This package’s own version, compiled in, plus the only version comparison Audity needs. The constant is duplicated from package.json because a built player has no package manifest to ask; Tools/release/lint_package.py fails the release if the two ever disagree.

Declaration
public static class AudityVersion

Must equal package.json’s “version”.

Declaration
public const string Package = "1.0.0"

The version every node that predates the introduced-in stamp belongs to. Nothing shipped before this, so an unstamped node type is a 1.0 node.

Declaration
public const string Initial = "1.0.0"

Compares two “major.minor.patch” strings: negative if a is older, 0 if equal, positive if newer. Any pre-release suffix is ignored (1.2.0-pre.3 compares as 1.2.0), which is deliberate: a buyer on a pre-release of a version can read that version’s assets. An unparseable or empty string sorts oldest, so a missing stamp never triggers a warning.

Declaration
public static int Compare(string a, string b)

System.Int32

Type Name
System.String a
System.String b

True if version is newer than this package.

Declaration
public static bool IsNewerThanThisPackage(string version)

System.Boolean

Type Name
System.String version