Skip to content

Instantly share code, notes, and snippets.

@arun02139
Created January 21, 2017 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arun02139/b83d964653ea2806a5c5987e50154b2f to your computer and use it in GitHub Desktop.
Save arun02139/b83d964653ea2806a5c5987e50154b2f to your computer and use it in GitHub Desktop.
using SimpleSQL;
using UnityEngine;
using System.Collections;
using UnityEngine.Assertions;
//public class DatabaseManager : SingletonBehaviour<DatabaseManager>
public class DatabaseManager : MonoBehaviour
{
public static DatabaseManager i;
string _debugString;
void Awake()
{
#if UNITY_EDITOR
var editorPath = Application.persistentDataPath + "/Editor";
MasterData.overrideBasePath = editorPath;
MasterData.workingName = "MasterData_E";
MasterData.changeWorkingName = true;
MasterData.Initialize(true);
DynamicDB.overrideBasePath = editorPath;
DynamicDB.workingName = "DynamicDB_E";
DynamicDB.changeWorkingName = true;
DynamicDB.Initialize(true);
RosettaStone.overrideBasePath = editorPath;
RosettaStone.workingName = "RosettaStone_E";
RosettaStone.changeWorkingName = true;
RosettaStone.Initialize(true);
#endif
i = this;
}
public SimpleSQLManager MasterData;
public SimpleSQLManager DynamicDB;
public SimpleSQLManager RosettaStone;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment