LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

EditorUtility.NaturalCompare

public static int NaturalCompare(string a, string b);

Description

Human-like sorting.

Sorts strings alphabetically, but with numbers in strings numerically, so "xx11" comes after "xx2".