-
Notifications
You must be signed in to change notification settings - Fork 2
UDBase.Controllers.ConfigSystem
Common classes for IConfig
public class UDBase.Controllers.ConfigSystem.Config
Base fsJson config class for code reusage purposes
public abstract class UDBase.Controllers.ConfigSystem.FsJsonBaseConfig
: IConfig, ILogContext
Fields
Type | Name | Summary |
---|---|---|
ILog |
_log | |
ULogger |
_logger |
Methods
Type | Name | Summary |
---|---|---|
void |
AddNode(Type type, String name) |
|
T |
GetNode() | |
void |
InitNodes(List<ConfigItem> nodes) |
|
Boolean |
IsReady() | |
void |
LoadContent(String configContent) |
Config fallback controller, which uses JSON file (located in Application.persistentDataPath) serialization via Fullserializer
public class UDBase.Controllers.ConfigSystem.FsJsonDataConfig
: FsJsonBaseConfig, IConfig, ILogContext
Methods
Type | Name | Summary |
---|---|---|
Boolean |
IsReady() |
Config controller, which uses JSON file (located on remote web server), serialized via Fullserializer. How to use: 1. Save config in your client Resources 2. When config update is required, upload new version to your web server 3. Client starts with default config in Resources and tries to load stored config from data path immediately 4. Client tries to load new config from web server at the same time 5. If config not loaded to data path yet, Resources config is used 6. When config loaded from web server, it saved to data path and used 7. If config can't be loaded because of some problem, but loaded previously to data path, it used from here
public class UDBase.Controllers.ConfigSystem.FsJsonNetworkConfig
: FsJsonBaseConfig, IConfig, ILogContext, IInitializable
Methods
Type | Name | Summary |
---|---|---|
T |
GetNode() | |
void |
Initialize() | |
Boolean |
IsReady() |
Config controller, which uses JSON file (located in Resources) serialization via Fullserializer
public class UDBase.Controllers.ConfigSystem.FsJsonResourcesConfig
: FsJsonBaseConfig, IConfig, ILogContext
Using IConfig you can simple load data for your classes. You need to define class inherited from IConfigSource and add it to settings, after it you can read data, defined in it. One node per type is allowed.
public interface UDBase.Controllers.ConfigSystem.IConfig
Methods
Type | Name | Summary |
---|---|---|
T |
GetNode() | |
Boolean |
IsReady() | Is current config instance ready to use |
Basic interface for config node. Used only for ClassTypeReference filtering.
public interface UDBase.Controllers.ConfigSystem.IConfigSource