示例#1
0
        /// <summary>
        /// Get the singleton
        /// </summary>
        /// <returns></returns>
        public static TestDataTables GetInstance()
        {
            if (ReloadCount == 0)
            {
                _instance._ReloadAll(true);
    #if UNITY_EDITOR
                if (DataTableModule.IsFileSystemMode)
                {
                    for (var j = 0; j < TabFilePaths.Length; j++)
                    {
                        var tabFilePath = TabFilePaths[j];
                        DataTableModule.WatchDataTable(tabFilePath, (path) =>
                        {
                            if (path.Replace("\\", "/").EndsWith(path))
                            {
                                _instance.ReloadAll();
                                //UnityEngine.Debug.Log("File Watcher! Reload success! -> " + path);
                            }
                        });
                    }
                }
    #endif
            }

            return(_instance);
        }