Click or drag to resize

ConfigAccessorReadFieldsFromNode Method

Reads the values of the annotated persistent fields from a config node.

Namespace:  KSPDev.ConfigUtils
Assembly:  KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
Syntax
C#
public static void ReadFieldsFromNode(
	ConfigNode node,
	Type type,
	Object instance,
	string group = ""
)
Request Example View Source

Parameters

node
Type: (Default Namespace)ConfigNode
The config node to read data from.
type
Type: SystemType
The type to load fields for. In case of instance is set and all the fields, that need to be read, are not private, it's OK to provide just the type of the instance. However, when reading the private and static fields, it's important to set the right type. That is, the type which actually defines the fields. Otherwise, they won't be found.
instance
Type: SystemObject
The instance to look the fields in. If it's null then only the static fields will be loaded.
group (Optional)
Type: SystemString
The group tag (see BasePersistentFieldAttribute).
See Also