parseString

fun parseString(versionString: String): UnityVersion?

Parses a Unity version string into a UnityVersion object.

This method takes a Unity version string in the format "YYYY.M.mX", where:

  • YYYY is the 4-digit year,

  • M is the major version number,

  • m is the minor version number,

  • X is an optional patch suffix (can be letters and/or numbers).

Return

A UnityVersion object if the format is valid, or null if parsing fails.

Parameters

versionString

The Unity version string to be parsed, e.g., "2022.3.7f1".