Auto Generate for Tab File: "Subdir/SubSubDir/Example3.bytes" No use of generic and reflection, for better performance, less IL code generating
Inheritance: IReloadableSettings
示例#1
0
        /// <summary>
        /// Get the singleton
        /// </summary>
        /// <returns></returns>
        public static SubdirSubSubDirExample3Settings GetInstance()
        {
            if (_instance == null)
            {
                _instance = new SubdirSubSubDirExample3Settings();

                _instance._ReloadAll(true);
    #if UNITY_EDITOR
                if (SettingModule.IsFileSystemMode)
                {
                    for (var j = 0; j < TabFilePaths.Length; j++)
                    {
                        var tabFilePath = TabFilePaths[j];
                        SettingModule.WatchSetting(tabFilePath, (path) =>
                        {
                            if (path.Replace("\\", "/").EndsWith(path))
                            {
                                _instance.ReloadAll();
                                Log.LogConsole_MultiThread("Reload success! -> " + path);
                            }
                        });
                    }
                }
    #endif
            }
            return(_instance);
        }
示例#2
0
        /// <summary>
        /// Get the singleton
        /// </summary>
        /// <returns></returns>
	    public static SubdirSubSubDirExample3Settings GetInstance()
	    {
            if (_instance == null) 
            {
                _instance = new SubdirSubSubDirExample3Settings();

                _instance._ReloadAll(true);
    #if UNITY_EDITOR
                if (SettingModule.IsFileSystemMode)
                {
                    for (var j = 0; j < TabFilePaths.Length; j++)
                    {
                        var tabFilePath = TabFilePaths[j];
                        SettingModule.WatchSetting(tabFilePath, (path) =>
                        {
                            if (path.Replace("\\", "/").EndsWith(path))
                            {
                                _instance.ReloadAll();
                                Log.LogConsole_MultiThread("Reload success! -> " + path);
                            }
                        });
                    }

                }
    #endif
            }
	        return _instance;
	    }