Skip to main content

ParseVersion

public static string ParseVersion(string version)
ParameterTypeDefaultDescription
versionstringThe version to pass in, formatted as "1.2.3", or in other words "major.minor.patch"

Returns: A table of up to 3 ints [major, minor, patch]

Convert a version (formatted as "1.2.3", or in other words "major.minor.patch") as string into a table of 3 ints [major, minor, patch].


Example Usage

using UnityEngine;
using MikeDaBird.EZRecolor;

class ConvertVersion : MonoBehavior{
public string version = "1.3.2";

// Generate a file path from a path and file name
public void Start(){
int[] parsedVersion = EZRecolor.ParseVersion(version);
// This will return the following:
// [1, 3, 2]
}
}