docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UnityVersion

    Represents a Unity version number with major, minor, and patch components.

    Inheritance
    object
    UnityVersion
    Implements
    IComparable<UnityVersion>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.SimulationPro
    Assembly: Unity.SimulationPro.Capture.dll
    Syntax
    public class UnityVersion : IComparable<UnityVersion>

    Fields

    majorVersion

    The major version component (e.g. 6 in 6000.3.9f1).

    Declaration
    public int majorVersion
    Field Value
    Type Description
    int

    minorVersion

    The minor version component (e.g. 3 in 6000.3.9f1).

    Declaration
    public int minorVersion
    Field Value
    Type Description
    int

    patchVersion

    The patch version component (e.g. 9 in 6000.3.9f1).

    Declaration
    public int patchVersion
    Field Value
    Type Description
    int

    Methods

    CompareTo(UnityVersion)

    Compares this version to another UnityVersion, ordering by major, minor, then patch.

    Declaration
    public int CompareTo(UnityVersion obj)
    Parameters
    Type Name Description
    UnityVersion obj

    The other version to compare against.

    Returns
    Type Description
    int

    1 if this version is greater, -1 if less, or 0 if equal.

    Implements

    IComparable<T>
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)