TryParse(string, out AndroidSdkVersionFull)
Tries to parse an Android SDK version from a string, for example 36 or 36.1.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
TryParse(string, AndroidSdkVersionFull)
public static bool TryParse(string version, out AndroidSdkVersionFull parsed)
Parameters
The string representation of the Android SDK version to parse, for example or .
3636.1When this method returns, contains the parsed AndroidSdkVersionFull if parsing succeeded, or null otherwise.
Returns
Type | Description |
|---|---|
| bool | true if |
Remarks
This method doesn't support previews and extension SDKs, such as , and returns false.
37.2-beta136-ext18Examples
using UnityEngine;using UnityEditor;public class AndroidSdkVersionFullTryParseSample : MonoBehaviour{ [MenuItem("Build/AndroidSdkVersionFull TryParse Sample")] public static void ParseAndroidSdkVersionFull() { if (AndroidSdkVersionFull.TryParse("36.1", out AndroidSdkVersionFull version)) PlayerSettings.Android.compileSdkVersion = version; }}