//public static void RenameDatabase(string newDatabaseName, int databaseIndex)
        //{
        //    RenameDatabase(newDatabaseName, GetDatabase(databaseIndex).Name);
        //}


        public static void RemoveDatabase(Database database)
        {
            string path = DatabaseUtilities.GetDatabasePath(database.Name);

            AssetDatabase.DeleteAsset(path);
            AssetDatabase.Refresh();
        }
        public static void RenameDatabase(string newDatabaseName, Database database)
        {
            AssetDatabase.RenameAsset(DatabaseUtilities.GetDatabasePath(database.Name), newDatabaseName);

            database.Name = newDatabaseName;

            AssetDatabase.Refresh();
        }
        public static void CreateNewDatabase(DatabaseSettings settings)
        {
            Database database = ScriptableObject.CreateInstance <Database>();

            database.Settings = settings;

            string assetPath = DatabaseUtilities.GetDatabasePath(database.Name);

            //Handle existing databases
            AssetDatabase.DeleteAsset(assetPath);
            AssetDatabase.Refresh();

            AssetDatabase.CreateAsset(database, assetPath);

            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
        }