C# Class KEngine.Modules.SettingModule

Unity SettingModule, with Resources.Load in product, with File.Read in editor
Inheritance: SettingModuleBase
Afficher le fichier Open project: mr-kelly/KEngine Class Usage Examples

Méthodes publiques

Свойство Type Description
CustomLoadSetting LoadSettingFuncDelegate
SettingBytesFilter SettingBytesFilterDelegate

Méthodes publiques

Méthode Description
DefaultLoadSetting ( string path ) : byte[]

Default load setting strategry, editor load file, runtime resources.load

Get ( string path, bool useCache = true ) : TableFile

Quick method to get TableFile from instance

WatchSetting ( string path, System action ) : void

Watch the setting file, when changed, trigger the delegate

Méthodes protégées

Méthode Description
LoadSetting ( string path ) : string

Unity Resources.Load setting file in Resources folder

Private Methods

Méthode Description
GetFileSystemPath ( string path ) : string
LoadSettingFromFile ( string path ) : byte[]

Load setting in file system using `File` class

LoadSettingFromResources ( string path ) : byte[]
LoadSettingFromStreamingAssets ( string path ) : byte[]

KEngine 3 后,增加同步loadStreamingAssets文件,统一只用StreamingAsset路径

SettingModule ( ) : System

Method Details

DefaultLoadSetting() public static méthode

Default load setting strategry, editor load file, runtime resources.load
public static DefaultLoadSetting ( string path ) : byte[]
path string
Résultat byte[]

Get() public static méthode

Quick method to get TableFile from instance
public static Get ( string path, bool useCache = true ) : TableFile
path string
useCache bool
Résultat TableFile

LoadSetting() protected méthode

Unity Resources.Load setting file in Resources folder
protected LoadSetting ( string path ) : string
path string
Résultat string

WatchSetting() public static méthode

Watch the setting file, when changed, trigger the delegate
public static WatchSetting ( string path, System action ) : void
path string
action System
Résultat void

Property Details

CustomLoadSetting public_oe static_oe property

Override the default load file strategy
public static LoadSettingFuncDelegate CustomLoadSetting
Résultat LoadSettingFuncDelegate

SettingBytesFilter public_oe static_oe property

Filter the loaded bytes, which settings file may be encrypted, so you can manipulate the bytes
public static SettingBytesFilterDelegate SettingBytesFilter
Résultat SettingBytesFilterDelegate