unity scene name instead of index code example
Example: unity get scene name by index
private static string NameFromIndex(int BuildIndex)
{
string path = SceneUtility.GetScenePathByBuildIndex(BuildIndex);
int slash = path.LastIndexOf('/');
string name = path.Substring(slash + 1);
int dot = name.LastIndexOf('.');
return name.Substring(0, dot);
}