void LoadProfile()
    {
        if (!CheckPlaying())
        {
            return;
        }

        string prevProfile = MadLevelProfile.profile;

        MadLevelProfile.profile = selectedProfileName;

        var path = EditorUtility.OpenFilePanel("Load Profile", "", "profile");

        if (path.Length != 0)
        {
            var levels = System.IO.File.ReadAllText(path);
            MadLevelProfile.LoadProfileFromString(levels);
            MadLevelProfile.Save();

            // reload level
            Application.LoadLevel(Application.loadedLevel);
        }

        MadLevelProfile.profile = prevProfile;
    }