public void UserSavingLevel(string levelName)
        {
            for (int i = 0; i < _Grid.instance.kuboGrid.Length; i++)
            {
                if (_Grid.instance.kuboGrid[i].cubeOnPosition != null)
                {
                    activeNodes.Add(_Grid.instance.kuboGrid[i]);
                }
            }

            //storing data in levelDataFile
            levelData.levelName = levelName;
            levelData.biome     = _MaterialCentral.instance.staticIndex;

            currentOpenLevelName = levelName;

            foreach (Node node in activeNodes)
            {
                node.savedCubeType = Node.ConvertTypeToString(node.cubeType);
                levelData.nodesToSave.Add(node);
            }

            string json      = JsonUtility.ToJson(levelData);
            string levelFile = levelName + ".json";

            string folder = Application.persistentDataPath + "/UserLevels";

            if (!Directory.Exists(folder))
            {
                Directory.CreateDirectory(folder);
            }

            string path = Path.Combine(folder, levelFile);

            if (File.Exists(path))
            {
                File.Delete(path);
            }

            File.WriteAllText(path, json);

            UserLevelFiles.AddNewUserLevel(levelName);
            LevelsManager.instance.RefreshUserLevels();

            levelData.nodesToSave.Clear();
            activeNodes.Clear();

            Debug.Log("Level Saved by User at " + path);
        }
 public void UserDeleteLevel(string levelName)
 {
     UserLevelFiles.DeleteUserLevel(levelName);
     LevelsManager.instance.RefreshUserLevels();
 }