Ejemplo n.º 1
0
        public void Init()
        {
#if UNITY_EDITOR || UNITY_STANDALONE
            appDBPath = Application.streamingAssetsPath + "/DB/" + DBName;
#elif UNITY_ANDROID
            appDBPath = Application.persistentDataPath + "/" + DBName;
            WWW loadDB = new WWW("jar:file://" + Application.dataPath + "!/assets/" + DBName);
            while (loadDB.isDone)
            {
                File.WriteAllBytes(appDBPath, loadDB.bytes);
            }
#endif
            OpenDB("URI=file:" + appDBPath);
            m_DBTableManager = new DBTableManager();
            m_UserTable      = CreateDBTable <DBUser>(userTableName);
        }