namespace AssetRipper.VersionUtilities; /// /// An enumeration representing the letter in a Unity Version string /// public enum UnityVersionType : byte { /// /// a /// Alpha = 0, /// /// b /// Beta, /// /// c /// China, /// /// f /// Final, /// /// p /// Patch, /// /// x /// Experimental, /// /// The minimum valid value for this enumeration /// MinValue = Alpha, /// /// The maximum valid value for this enumeration /// MaxValue = Experimental, } /// /// Extension methods for /// public static class UnityVersionTypeExtentions { /// /// Convert to the relevant character /// /// A Unity version type /// The character this value represents /// The type is not a valid value public static char ToCharacter(this UnityVersionType type) { return type switch { UnityVersionType.Alpha => 'a', UnityVersionType.Beta => 'b', UnityVersionType.China => 'c', UnityVersionType.Final => 'f', UnityVersionType.Patch => 'p', UnityVersionType.Experimental => 'x', _ => 'u',//unknown }; } }