Example #1
0
        static UnityVersion GetVersion(TextLine line)
        {
            int index = line.Text.IndexOf(' ');

            if (index <= 0 || !UnityVersion.TryParse(line.Text.Substring(0, index), out var version))
            {
                throw new ProgramException("Invalid version table in README");
            }
            return(version);
        }
Example #2
0
 static PatcherKind GetPatcherKind(string unityVersion)
 {
     if (!UnityVersion.TryParse(unityVersion, out var version))
     {
         throw new ProgramException("Invalid version number");
     }
     if (version.Extra == string.Empty)
     {
         return(PatcherKind.V35);
     }
     if (version.Extra == "-mbe")
     {
         return(PatcherKind.V40);
     }
     return(PatcherKind.Unknown);
 }