ConfigAccessorReadFieldsFromFile Method |
Reads values of the annotated persistent fields from a config file.
Namespace:
KSPDev.ConfigUtils
Assembly:
KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
Syntaxpublic static void ReadFieldsFromFile(
string filePath,
Type type,
Object instance,
string nodePath = null,
string group = ""
)
Request Example
View SourceParameters
- filePath
- Type: SystemString
A relative or an absolute path to the file. It's resolved via
MakeAbsPathForGameData(String).
- type
- Type: SystemType
A type to load fields for. - instance
- Type: SystemObject
An instance of type type. If it's null then
only static fields will be loaded.
- nodePath (Optional)
- Type: SystemString
An optional path in the file. All type's field will be read relative to this part.
- group (Optional)
- Type: SystemString
A group tag (see BasePersistentFieldAttribute).
See Also