public virtual LevelEditorSaveData LoadLevel(string path)
        {
            loadLocation = path;
            LevelEditorSaveData data;

            if (!File.Exists(path))
            {
                Debug.LogError($"There's no file with path '{path}'.");
                return(new LevelEditorSaveData());
            }

            switch (levelFormat)
            {
            case FormatType.JSON:
                data = LevelEditorSerializer.DeserializeJson <LevelEditorSaveData>(File.ReadAllText(path));
                break;

            case FormatType.Binary:
                data = LevelEditorSerializer.DeserializeBinary <LevelEditorSaveData>(File.ReadAllBytes(path), compress);
                break;

            default:
                data = new LevelEditorSaveData();
                break;
            }

            return(LoadLevel(data));
        }
        public virtual LevelEditorSaveData LoadLevelFromBytes(byte[] levelBytes)
        {
            LevelEditorSaveData data = LevelEditorSerializer.DeserializeBinary <LevelEditorSaveData>(levelBytes, compress);

            return(LoadLevel(data));
        }