Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
ConfigNode Class Reference

Acts as a config file reader and writer. Contains a list of values and sub nodes. Can read or write itself or objects to files. More...

Classes

class  ConfigNodeList
 
class  Value
 A value contained in a config node. string value name and string value More...
 
class  ValueList
 

Public Member Functions

void AddData (ConfigNode node)
 
ConfigNode AddNode (string name)
 Adds a ConfigNode to this node's node list More...
 
ConfigNode AddNode (string name, string vcomment)
 Adds a ConfigNode to this node's node list More...
 
ConfigNode AddNode (ConfigNode node)
 Adds a ConfigNode to this node's node list More...
 
ConfigNode AddNode (string name, ConfigNode node)
 Adds a ConfigNode to this node's node list More...
 
void AddValue (string name, object value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, string value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, object value)
 Adds a value of given name to values list More...
 
void AddValue (string name, string value)
 Adds a value of given name to values list More...
 
void AddValue (string name, bool value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, bool value)
 Adds a value of given name to values list More...
 
void AddValue (string name, byte value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, byte value)
 Adds a value of given name to values list More...
 
void AddValue (string name, sbyte value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, sbyte value)
 Adds a value of given name to values list More...
 
void AddValue (string name, char value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, char value)
 Adds a value of given name to values list More...
 
void AddValue (string name, decimal value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, decimal value)
 Adds a value of given name to values list More...
 
void AddValue (string name, double value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, double value)
 Adds a value of given name to values list More...
 
void AddValue (string name, float value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, float value)
 Adds a value of given name to values list More...
 
void AddValue (string name, int value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, int value)
 Adds a value of given name to values list More...
 
void AddValue (string name, uint value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, uint value)
 Adds a value of given name to values list More...
 
void AddValue (string name, long value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, long value)
 Adds a value of given name to values list More...
 
void AddValue (string name, ulong value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, ulong value)
 Adds a value of given name to values list More...
 
void AddValue (string name, short value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, short value)
 Adds a value of given name to values list More...
 
void AddValue (string name, ushort value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, ushort value)
 Adds a value of given name to values list More...
 
void AddValue (string name, Vector2 value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, Vector2 value)
 Adds a value of given name to values list More...
 
void AddValue (string name, Vector3 value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, Vector3 value)
 Adds a value of given name to values list More...
 
void AddValue (string name, Vector3d value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, Vector3d value)
 Adds a value of given name to values list More...
 
void AddValue (string name, Vector4 value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, Vector4 value)
 Adds a value of given name to values list More...
 
void AddValue (string name, Quaternion value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, Quaternion value)
 Adds a value of given name to values list More...
 
void AddValue (string name, QuaternionD value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, QuaternionD value)
 Adds a value of given name to values list More...
 
void AddValue (string name, Matrix4x4 value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, Matrix4x4 value)
 Adds a value of given name to values list More...
 
void AddValue (string name, Color value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, Color value)
 Adds a value of given name to values list More...
 
void AddValue (string name, Color32 value, string vcomment)
 Adds a value of given name to values list More...
 
void AddValue (string name, Color32 value)
 Adds a value of given name to values list More...
 
void ClearData ()
 Clear all data that this node has More...
 
void ClearNodes ()
 Clears the list of nodes More...
 
void ClearValues ()
 Clears the list of values More...
 
 ConfigNode (string name)
 Create a new ConfigNode of given name More...
 
 ConfigNode (string name, string vcomment)
 Create a new ConfigNode of given name More...
 
 ConfigNode ()
 Creates a new ConfigNode More...
 
void CopyTo (ConfigNode node)
 Copies this ConfigNode into another ConfigNode recursivly More...
 
void CopyTo (ConfigNode node, bool overwrite)
 Copies this ConfigNode into another ConfgNode recursively, overwriting nodes/values if specified. More...
 
void CopyTo (ConfigNode node, string newName)
 Copies this ConfigNode into another ConfigNode recursivly More...
 
ConfigNode CreateCopy ()
 Creates a copy of this confignode More...
 
ConfigNode GetNode (string name)
 Gets a node of the given name More...
 
ConfigNode GetNode (string name, string valueName, string value)
 Gets a node of the given name and has a value of value value More...
 
ConfigNode GetNode (string name, int index)
 Gets a node of the given name More...
 
ConfigNode GetNodeID (string id)
 Gets a node of the given ID More...
 
ConfigNode[] GetNodes (string name)
 Gets an array of nodes that share the given name More...
 
ConfigNode[] GetNodes (string name, string valueName, string value)
 Gets an array of nodes that share the given name and have a value of name valueName and value value More...
 
ConfigNode[] GetNodes ()
 Gets an array of all nodes within this node More...
 
string GetValue (string name)
 Gets a value by name More...
 
string GetValue (string name, int index)
 Gets a value by name More...
 
string[] GetValues ()
 Gets an array of all values on the node More...
 
string[] GetValues (string name)
 Gets an array of values sharing the same name More...
 
List< string > GetValuesList (string name)
 Gets an array of values sharing the same name More...
 
string[] GetValuesStartsWith (string name)
 Gets an array of values sharing the same name More...
 
bool HasNode (string name)
 Does this node contain a node of the given name? More...
 
bool HasNode ()
 Does this config node contain any nodes More...
 
bool HasNodeID (string id)
 Does this node contain a node of the given name? More...
 
bool HasValue (string name)
 Does this config node contain a value of given name More...
 
bool HasValue ()
 Does this config node contain any values More...
 
bool HasValues (params string[] values)
 Returns true if the ConfigNode contains all the specified values passed as parameters More...
 
void RemoveNode (string name)
 Removes the first node of given name from the node list More...
 
void RemoveNode (ConfigNode node)
 Removes the first node of given name from the node list More...
 
void RemoveNodes (string name)
 Removes all nodes of given name from the node list More...
 
void RemoveNodesStartWith (string startsWith)
 Removes all nodes of given name from the node list More...
 
void RemoveValue (string name)
 Removes the first value of given name from the value list More...
 
void RemoveValues (params string[] names)
 Removes all values of given names from the value list More...
 
void RemoveValues (string startsWith)
 Removes all values of given name from the value list More...
 
void RemoveValuesStartWith (string startsWith)
 Removes all values that start with the given string form the values list More...
 
bool Save (string fileFullName)
 Saves this node to a file More...
 
bool Save (string fileFullName, string header)
 Saves this node to a file More...
 
bool SetNode (string name, ConfigNode newNode, bool createIfNotFound=false)
 Sets a node by name More...
 
bool SetNode (string name, ConfigNode newNode, int index, bool createIfNotFound=false)
 Sets a node by name. index being the nth occurance of the value name More...
 
bool SetValue (string name, string newValue, bool createIfNotFound=false)
 Sets a value by name More...
 
bool SetValue (string name, string newValue, int index, bool createIfNotFound=false)
 Sets a value by name. index being the nth occurance of the value name More...
 
bool SetValue (string name, string newValue, string vcomment, bool createIfNotFound=false)
 Sets a value by name More...
 
bool SetValue (string name, string newValue, string vcomment, int index, bool createIfNotFound=false)
 Sets a value by name. index being the nth occurance of the value name More...
 
bool SetValue (string name, bool newValue, bool createIfNotFound=false)
 
bool SetValue (string name, bool newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, bool newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, bool newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, byte newValue, bool createIfNotFound=false)
 
bool SetValue (string name, byte newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, byte newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, byte newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, sbyte newValue, bool createIfNotFound=false)
 
bool SetValue (string name, sbyte newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, sbyte newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, sbyte newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, char newValue, bool createIfNotFound=false)
 
bool SetValue (string name, char newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, char newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, char newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, decimal newValue, bool createIfNotFound=false)
 
bool SetValue (string name, decimal newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, decimal newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, decimal newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, double newValue, bool createIfNotFound=false)
 
bool SetValue (string name, double newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, double newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, double newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, float newValue, bool createIfNotFound=false)
 
bool SetValue (string name, float newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, float newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, float newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, int newValue, bool createIfNotFound=false)
 
bool SetValue (string name, int newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, int newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, int newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, uint newValue, bool createIfNotFound=false)
 
bool SetValue (string name, uint newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, uint newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, uint newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, long newValue, bool createIfNotFound=false)
 
bool SetValue (string name, long newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, long newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, long newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, ulong newValue, bool createIfNotFound=false)
 
bool SetValue (string name, ulong newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, ulong newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, ulong newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, short newValue, bool createIfNotFound=false)
 
bool SetValue (string name, short newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, short newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, short newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, ushort newValue, bool createIfNotFound=false)
 
bool SetValue (string name, ushort newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, ushort newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, ushort newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Vector2 newValue, bool createIfNotFound=false)
 
bool SetValue (string name, Vector2 newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Vector2 newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, Vector2 newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Vector3 newValue, bool createIfNotFound=false)
 
bool SetValue (string name, Vector3 newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Vector3 newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, Vector3 newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Vector3d newValue, bool createIfNotFound=false)
 
bool SetValue (string name, Vector3d newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Vector3d newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, Vector3d newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Vector4 newValue, bool createIfNotFound=false)
 
bool SetValue (string name, Vector4 newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Vector4 newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, Vector4 newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Quaternion newValue, bool createIfNotFound=false)
 
bool SetValue (string name, Quaternion newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Quaternion newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, Quaternion newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, QuaternionD newValue, bool createIfNotFound=false)
 
bool SetValue (string name, QuaternionD newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, QuaternionD newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, QuaternionD newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Matrix4x4 newValue, bool createIfNotFound=false)
 
bool SetValue (string name, Matrix4x4 newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Matrix4x4 newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, Matrix4x4 newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Color newValue, bool createIfNotFound=false)
 
bool SetValue (string name, Color newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Color newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, Color newValue, string vcomment, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Color32 newValue, bool createIfNotFound=false)
 
bool SetValue (string name, Color32 newValue, int index, bool createIfNotFound=false)
 
bool SetValue (string name, Color32 newValue, string vcomment, bool createIfNotFound=false)
 
bool SetValue (string name, Color32 newValue, string vcomment, int index, bool createIfNotFound=false)
 
override string ToString ()
 Gets string representation of this node recursivly More...
 
bool TryGetEnum (string name, Type enumType, ref Enum value)
 Get an enum from a node, and a default value if it fails More...
 
bool TryGetEnum< T > (string name, ref T value, T defaultValue)
 Get an enum from a node, and a default value if it fails More...
 
bool TryGetNode (string name, ref ConfigNode node)
 Returns true if the ConfigNode contains a node of the given name, and stores it in the ref value More...
 
bool TryGetValue (string name, ref string value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a string More...
 
bool TryGetValue (string name, ref string[] value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a string array More...
 
bool TryGetValue (string name, ref float value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a float More...
 
bool TryGetValue (string name, ref double value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a double More...
 
bool TryGetValue (string name, ref int value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as an int More...
 
bool TryGetValue (string name, ref uint value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as an uint More...
 
bool TryGetValue (string name, ref long value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a long More...
 
bool TryGetValue (string name, ref ulong value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a ulong More...
 
bool TryGetValue (string name, ref bool value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a bool More...
 
bool TryGetValue (string name, ref Vector3 value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector3 More...
 
bool TryGetValue (string name, ref Vector3d value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector3d More...
 
bool TryGetValue (string name, ref Vector2 value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector2 More...
 
bool TryGetValue (string name, ref Vector2d value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector2d More...
 
bool TryGetValue (string name, ref Vector4 value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector4 More...
 
bool TryGetValue (string name, ref Vector4d value)
 Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector4d More...
 
bool TryGetValue (string name, ref Quaternion value)
 
bool TryGetValue (string name, ref QuaternionD value)
 
bool TryGetValue (string name, ref Rect value)
 
bool TryGetValue (string name, ref Color value)
 
bool TryGetValue (string name, ref Color32 value)
 
bool TryGetValue (string name, ref Guid value)
 Tries to get Guid value. This one is courtesy of JPL. More...
 

Static Public Member Functions

static bool CheckAndParseColor (string colorString, out Color color)
 
static void CompileConfig (ConfigNode node)
 
static ConfigNode CreateConfigFromObject (object obj)
 Creates a ConfigNode from any object. Uses reflection. More...
 
static ConfigNode CreateConfigFromObject (object obj, ConfigNode node)
 Creates a ConfigNode from any object. Uses reflection. More...
 
static ConfigNode CreateConfigFromObject (object obj, int pass)
 Creates a ConfigNode from any object. Uses reflection. More...
 
static ConfigNode CreateConfigFromObject (object obj, int pass, ConfigNode node)
 Creates a ConfigNode from any object. Uses reflection. More...
 
static object CreateObjectFromConfig (string typeName, ConfigNode node)
 Creates an object from the ConfigNode of the given type name and loads the values into it. DO NOT USE ON MONOBEHAVIOURS! More...
 
static object CreateObjectFromConfig (ConfigNode node)
 Creates an object from the ConfigNode, the class name being the node name and loads the values into it. DO NOT USE ON MONOBEHAVIOURS! More...
 
static T CreateObjectFromConfig< T > (ConfigNode node)
 Creates an object from the ConfigNode, the class name being the node name and loads the values into it. DO NOT USE ON MONOBEHAVIOURS! More...
 
static ConfigNode Load (string fileFullName)
 Loads a file into a ConfigNode More...
 
static ConfigNode Load (string fileFullName, bool bypassLocalization)
 Loads a file into a ConfigNode More...
 
static ConfigNode LoadFromTextAssetResource (string resourcePath)
 Loads a text asset in resoruces into a ConfigNode, splits the file using the standard line brakes. More...
 
static bool LoadObjectFromConfig (object obj, ConfigNode node, int pass, bool removeAfterUse)
 Loads values from a ConfigNode into an object More...
 
static bool LoadObjectFromConfig (object obj, ConfigNode node, int pass)
 
static bool LoadObjectFromConfig (object obj, ConfigNode node)
 
static void Merge (ConfigNode mergeTo, ConfigNode mergeFrom)
 
static ConfigNode Parse (string s)
 Creates a ConfigNode from a string More...
 
static Color ParseColor (string vectorString)
 Parses a Color from a comma-separated string of XYZ values More...
 
static Color32 ParseColor32 (string vectorString)
 Parses a Color from a comma-separated string of XYZ values More...
 
static System.Enum ParseEnum (Type enumType, string vectorString)
 Parses a Color from a comma-separated string of XYZ values More...
 
static Matrix4x4 ParseMatrix4x4 (string quaternionString)
 Parses a Matrix4x4 from a comma-separated string of values More...
 
static Quaternion ParseQuaternion (string quaternionString)
 Parses a Quaternion from a comma-separated string of XYZW values More...
 
static QuaternionD ParseQuaternionD (string quaternionString)
 Parses a QuaternionD from a comma-separated string of XYZW values More...
 
static Vector2 ParseVector2 (string vectorString)
 Parses a Vector2 from a comma-separated string of XYZ values More...
 
static Vector3 ParseVector3 (string vectorString)
 Parses a Vector3 from a comma-separated string of XYZ values More...
 
static Vector3d ParseVector3D (string vectorString)
 Parses a Vector3 from a comma-separated string of XYZ values More...
 
static Vector4 ParseVector4 (string vectorString)
 Parses a Vector4 from a comma-separated string of XYZ values More...
 
static string WriteBoolArray (bool[]flags)
 Returns a comma-separated string for the given bools More...
 
static string WriteColor (Color color)
 Returns a comma-separated string for the given color More...
 
static string WriteColor (Color32 color)
 Returns a comma-separated string for the given color More...
 
static string WriteEnum (System.Enum en)
 Returns a comma-separated string for the given color More...
 
static string WriteEnumIntArray< T > (T[]flags)
 Returns a comma-separated string for the given enums as ints More...
 
static string WriteMatrix4x4 (Matrix4x4 matrix)
 Returns a comma-separated string for the given Matrix4x4 More...
 
static string WriteQuaternion (Quaternion quaternion)
 Returns a comma-separated string for the given quaternion More...
 
static string WriteQuaternion (QuaternionD quaternion)
 Returns a comma-separated string for the given quaternion More...
 
static string WriteStringArray (string[]strings)
 Returns a comma-separated string for the given strings More...
 
static string WriteVector (Vector2 vector)
 Returns a comma-separated string for the given vector More...
 
static string WriteVector (Vector3 vector)
 Returns a comma-separated string for the given vector More...
 
static string WriteVector (Vector3d vector)
 Returns a comma-separated string for the given vector More...
 
static string WriteVector (Vector4 vector)
 Returns a comma-separated string for the given vector More...
 

Public Attributes

string comment = null
 The comment, if any, for this node More...
 
const string configTabIndent = "\t"
 Default config indent character More...
 
string id = ""
 ID of this node if given More...
 
string name = ""
 Name of this node More...
 

Properties

int CountNodes [get]
 Returns number of nodes in this node More...
 
int CountValues [get]
 Returns number of values in this node More...
 
bool HasData [get]
 Has this config node any data (values or nodes) assigned More...
 
ConfigNodeList nodes [get]
 
ValueList values [get]
 

Detailed Description

Acts as a config file reader and writer. Contains a list of values and sub nodes. Can read or write itself or objects to files.

Constructor & Destructor Documentation

ConfigNode.ConfigNode ( string  name)
inline

Create a new ConfigNode of given name

Parameters
name
ConfigNode.ConfigNode ( string  name,
string  vcomment 
)
inline

Create a new ConfigNode of given name

Parameters
name
ConfigNode.ConfigNode ( )
inline

Creates a new ConfigNode

Parameters
name

Member Function Documentation

void ConfigNode.AddData ( ConfigNode  node)
inline
ConfigNode ConfigNode.AddNode ( string  name)
inline

Adds a ConfigNode to this node's node list

Parameters
name
Returns
ConfigNode ConfigNode.AddNode ( string  name,
string  vcomment 
)
inline

Adds a ConfigNode to this node's node list

Parameters
name
Returns
ConfigNode ConfigNode.AddNode ( ConfigNode  node)
inline

Adds a ConfigNode to this node's node list

Parameters
name
Returns
ConfigNode ConfigNode.AddNode ( string  name,
ConfigNode  node 
)
inline

Adds a ConfigNode to this node's node list

Parameters
name
Returns
void ConfigNode.AddValue ( string  name,
object  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment(defaults to null)
Returns
void ConfigNode.AddValue ( string  name,
string  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment(defaults to null)
Returns
void ConfigNode.AddValue ( string  name,
object  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
string  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
bool  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
bool  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
byte  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
byte  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
sbyte  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
sbyte  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
char  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
char  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
decimal  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
decimal  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
double  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
double  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
float  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
float  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
int  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
int  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
uint  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
uint  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
long  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
long  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
ulong  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
ulong  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
short  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
short  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
ushort  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
ushort  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
Vector2  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
Vector2  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
Vector3  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
Vector3  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
Vector3d  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
Vector3d  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
Vector4  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
Vector4  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
Quaternion  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
Quaternion  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
QuaternionD  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
QuaternionD  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
Matrix4x4  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
Matrix4x4  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
Color  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
Color  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
void ConfigNode.AddValue ( string  name,
Color32  value,
string  vcomment 
)
inline

Adds a value of given name to values list

Parameters
name
value
commment
Returns
void ConfigNode.AddValue ( string  name,
Color32  value 
)
inline

Adds a value of given name to values list

Parameters
name
value
Returns
static bool ConfigNode.CheckAndParseColor ( string  colorString,
out Color  color 
)
inlinestatic
void ConfigNode.ClearData ( )
inline

Clear all data that this node has

void ConfigNode.ClearNodes ( )
inline

Clears the list of nodes

Returns
void ConfigNode.ClearValues ( )
inline

Clears the list of values

Returns
static void ConfigNode.CompileConfig ( ConfigNode  node)
inlinestatic
void ConfigNode.CopyTo ( ConfigNode  node)
inline

Copies this ConfigNode into another ConfigNode recursivly

Parameters
nodeNode to copy into
void ConfigNode.CopyTo ( ConfigNode  node,
bool  overwrite 
)
inline

Copies this ConfigNode into another ConfgNode recursively, overwriting nodes/values if specified.

Parameters
node
overwrite
void ConfigNode.CopyTo ( ConfigNode  node,
string  newName 
)
inline

Copies this ConfigNode into another ConfigNode recursivly

Parameters
nodeNode to copy into
static ConfigNode ConfigNode.CreateConfigFromObject ( object  obj)
inlinestatic

Creates a ConfigNode from any object. Uses reflection.

Parameters
objObject to create ConfigNode from
Returns
ConfigNode representation
static ConfigNode ConfigNode.CreateConfigFromObject ( object  obj,
ConfigNode  node 
)
inlinestatic

Creates a ConfigNode from any object. Uses reflection.

Parameters
objObject to create ConfigNode from
nodeConfigNode to create data into
Returns
ConfigNode representation
static ConfigNode ConfigNode.CreateConfigFromObject ( object  obj,
int  pass 
)
inlinestatic

Creates a ConfigNode from any object. Uses reflection.

Parameters
objObject to create ConfigNode from
Returns
ConfigNode representation
static ConfigNode ConfigNode.CreateConfigFromObject ( object  obj,
int  pass,
ConfigNode  node 
)
inlinestatic

Creates a ConfigNode from any object. Uses reflection.

Parameters
objObject to create ConfigNode from
nodeConfigNode to create data into
Returns
ConfigNode representation
ConfigNode ConfigNode.CreateCopy ( )
inline

Creates a copy of this confignode

static object ConfigNode.CreateObjectFromConfig ( string  typeName,
ConfigNode  node 
)
inlinestatic

Creates an object from the ConfigNode of the given type name and loads the values into it. DO NOT USE ON MONOBEHAVIOURS!

Parameters
typeNameName of type to create
nodeConfigNode to load from
Returns
Created object
static object ConfigNode.CreateObjectFromConfig ( ConfigNode  node)
inlinestatic

Creates an object from the ConfigNode, the class name being the node name and loads the values into it. DO NOT USE ON MONOBEHAVIOURS!

Parameters
nodeConfigNode to load from
Returns
Created object
static T ConfigNode.CreateObjectFromConfig< T > ( ConfigNode  node)
inlinestatic

Creates an object from the ConfigNode, the class name being the node name and loads the values into it. DO NOT USE ON MONOBEHAVIOURS!

Template Parameters
TGeneric type parameter
Parameters
nodeConfigNode to load from
Returns
Created object of type T
ConfigNode ConfigNode.GetNode ( string  name)
inline

Gets a node of the given name

Parameters
name
Returns
ConfigNode ConfigNode.GetNode ( string  name,
string  valueName,
string  value 
)
inline

Gets a node of the given name and has a value of value value

Parameters
name
valueName
value
Returns
ConfigNode ConfigNode.GetNode ( string  name,
int  index 
)
inline

Gets a node of the given name

Parameters
name
index
Returns
ConfigNode ConfigNode.GetNodeID ( string  id)
inline

Gets a node of the given ID

Parameters
name
Returns
ConfigNode [] ConfigNode.GetNodes ( string  name)
inline

Gets an array of nodes that share the given name

Parameters
name
Returns
ConfigNode [] ConfigNode.GetNodes ( string  name,
string  valueName,
string  value 
)
inline

Gets an array of nodes that share the given name and have a value of name valueName and value value

Parameters
name
valueName
value
Returns
ConfigNode [] ConfigNode.GetNodes ( )
inline

Gets an array of all nodes within this node

Parameters
name
Returns
string ConfigNode.GetValue ( string  name)
inline

Gets a value by name

Parameters
name
Returns
string ConfigNode.GetValue ( string  name,
int  index 
)
inline

Gets a value by name

Parameters
name
index
Returns
string [] ConfigNode.GetValues ( )
inline

Gets an array of all values on the node

Returns
string [] ConfigNode.GetValues ( string  name)
inline

Gets an array of values sharing the same name

Parameters
name
Returns
List<string> ConfigNode.GetValuesList ( string  name)
inline

Gets an array of values sharing the same name

Parameters
name
Returns
string [] ConfigNode.GetValuesStartsWith ( string  name)
inline

Gets an array of values sharing the same name

Parameters
name
Returns
bool ConfigNode.HasNode ( string  name)
inline

Does this node contain a node of the given name?

Parameters
name
Returns
bool ConfigNode.HasNode ( )
inline

Does this config node contain any nodes

Parameters
name
Returns
bool ConfigNode.HasNodeID ( string  id)
inline

Does this node contain a node of the given name?

Parameters
name
Returns
bool ConfigNode.HasValue ( string  name)
inline

Does this config node contain a value of given name

Parameters
name
Returns
bool ConfigNode.HasValue ( )
inline

Does this config node contain any values

Parameters
name
Returns
bool ConfigNode.HasValues ( params string[]  values)
inline

Returns true if the ConfigNode contains all the specified values passed as parameters

Parameters
valuesList of values to find in the ConfigNode
static ConfigNode ConfigNode.Load ( string  fileFullName)
inlinestatic

Loads a file into a ConfigNode

Parameters
fileFullNameFull file path of file to load
Returns
Created ConfigNode or null if failure
static ConfigNode ConfigNode.Load ( string  fileFullName,
bool  bypassLocalization 
)
inlinestatic

Loads a file into a ConfigNode

Parameters
fileFullNameFull file path of file to load
bypassLocalizationSet to true to skip the localization of values
Returns
Created ConfigNode or null if failure
static ConfigNode ConfigNode.LoadFromTextAssetResource ( string  resourcePath)
inlinestatic

Loads a text asset in resoruces into a ConfigNode, splits the file using the standard line brakes.

Parameters
cfgDataPath in resources for the TextAsset
Returns
Created ConfigNode or null if failure</returns
static bool ConfigNode.LoadObjectFromConfig ( object  obj,
ConfigNode  node,
int  pass,
bool  removeAfterUse 
)
inlinestatic

Loads values from a ConfigNode into an object

Parameters
objObject to load node into
nodeConfigNode to load from
Returns
True if successful
static bool ConfigNode.LoadObjectFromConfig ( object  obj,
ConfigNode  node,
int  pass 
)
inlinestatic
static bool ConfigNode.LoadObjectFromConfig ( object  obj,
ConfigNode  node 
)
inlinestatic
static void ConfigNode.Merge ( ConfigNode  mergeTo,
ConfigNode  mergeFrom 
)
inlinestatic
static ConfigNode ConfigNode.Parse ( string  s)
inlinestatic

Creates a ConfigNode from a string

Parameters
sInput string
Returns
static Color ConfigNode.ParseColor ( string  vectorString)
inlinestatic

Parses a Color from a comma-separated string of XYZ values

static Color32 ConfigNode.ParseColor32 ( string  vectorString)
inlinestatic

Parses a Color from a comma-separated string of XYZ values

static System.Enum ConfigNode.ParseEnum ( Type  enumType,
string  vectorString 
)
inlinestatic

Parses a Color from a comma-separated string of XYZ values

static Matrix4x4 ConfigNode.ParseMatrix4x4 ( string  quaternionString)
inlinestatic

Parses a Matrix4x4 from a comma-separated string of values

static Quaternion ConfigNode.ParseQuaternion ( string  quaternionString)
inlinestatic

Parses a Quaternion from a comma-separated string of XYZW values

static QuaternionD ConfigNode.ParseQuaternionD ( string  quaternionString)
inlinestatic

Parses a QuaternionD from a comma-separated string of XYZW values

static Vector2 ConfigNode.ParseVector2 ( string  vectorString)
inlinestatic

Parses a Vector2 from a comma-separated string of XYZ values

static Vector3 ConfigNode.ParseVector3 ( string  vectorString)
inlinestatic

Parses a Vector3 from a comma-separated string of XYZ values

static Vector3d ConfigNode.ParseVector3D ( string  vectorString)
inlinestatic

Parses a Vector3 from a comma-separated string of XYZ values

static Vector4 ConfigNode.ParseVector4 ( string  vectorString)
inlinestatic

Parses a Vector4 from a comma-separated string of XYZ values

void ConfigNode.RemoveNode ( string  name)
inline

Removes the first node of given name from the node list

Parameters
nameName of node to remove
void ConfigNode.RemoveNode ( ConfigNode  node)
inline

Removes the first node of given name from the node list

Parameters
nameName of node to remove
void ConfigNode.RemoveNodes ( string  name)
inline

Removes all nodes of given name from the node list

Parameters
nameName of nodes to remove
void ConfigNode.RemoveNodesStartWith ( string  startsWith)
inline

Removes all nodes of given name from the node list

Parameters
startsWithName of nodes to remove
void ConfigNode.RemoveValue ( string  name)
inline

Removes the first value of given name from the value list

Parameters
nameName of value to remove
void ConfigNode.RemoveValues ( params string[]  names)
inline

Removes all values of given names from the value list

Parameters
namesNames of values to remove
void ConfigNode.RemoveValues ( string  startsWith)
inline

Removes all values of given name from the value list

Parameters
startsWithName of values to remove
void ConfigNode.RemoveValuesStartWith ( string  startsWith)
inline

Removes all values that start with the given string form the values list

Parameters
nameName of values to remove
bool ConfigNode.Save ( string  fileFullName)
inline

Saves this node to a file

Parameters
fileFullNameFull file path of file to load
Returns
true
bool ConfigNode.Save ( string  fileFullName,
string  header 
)
inline

Saves this node to a file

Parameters
fileFullNameFull file path of file to load
headerHelpful header text
Returns
True
bool ConfigNode.SetNode ( string  name,
ConfigNode  newNode,
bool  createIfNotFound = false 
)
inline

Sets a node by name

Parameters
name
Returns
bool ConfigNode.SetNode ( string  name,
ConfigNode  newNode,
int  index,
bool  createIfNotFound = false 
)
inline

Sets a node by name. index being the nth occurance of the value name

Parameters
name
Returns
bool ConfigNode.SetValue ( string  name,
string  newValue,
bool  createIfNotFound = false 
)
inline

Sets a value by name

Parameters
name
Returns
bool ConfigNode.SetValue ( string  name,
string  newValue,
int  index,
bool  createIfNotFound = false 
)
inline

Sets a value by name. index being the nth occurance of the value name

Parameters
name
Returns
bool ConfigNode.SetValue ( string  name,
string  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline

Sets a value by name

Parameters
name
Returns
bool ConfigNode.SetValue ( string  name,
string  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline

Sets a value by name. index being the nth occurance of the value name

Parameters
name
Returns
bool ConfigNode.SetValue ( string  name,
bool  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
bool  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
bool  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
bool  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
byte  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
byte  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
byte  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
byte  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
sbyte  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
sbyte  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
sbyte  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
sbyte  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
char  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
char  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
char  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
char  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
decimal  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
decimal  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
decimal  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
decimal  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
double  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
double  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
double  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
double  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
float  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
float  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
float  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
float  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
int  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
int  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
int  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
int  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
uint  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
uint  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
uint  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
uint  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
long  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
long  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
long  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
long  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
ulong  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
ulong  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
ulong  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
ulong  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
short  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
short  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
short  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
short  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
ushort  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
ushort  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
ushort  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
ushort  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector2  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector2  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector2  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector2  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector3  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector3  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector3  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector3  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector3d  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector3d  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector3d  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector3d  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector4  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector4  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector4  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Vector4  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Quaternion  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Quaternion  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Quaternion  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Quaternion  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
QuaternionD  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
QuaternionD  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
QuaternionD  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
QuaternionD  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Matrix4x4  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Matrix4x4  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Matrix4x4  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Matrix4x4  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Color  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Color  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Color  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Color  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Color32  newValue,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Color32  newValue,
int  index,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Color32  newValue,
string  vcomment,
bool  createIfNotFound = false 
)
inline
bool ConfigNode.SetValue ( string  name,
Color32  newValue,
string  vcomment,
int  index,
bool  createIfNotFound = false 
)
inline
override string ConfigNode.ToString ( )
inline

Gets string representation of this node recursivly

Returns
Multi-line string
bool ConfigNode.TryGetEnum ( string  name,
Type  enumType,
ref Enum  value 
)
inline

Get an enum from a node, and a default value if it fails

Template Parameters
TEnum Type
Parameters
namename of the field in the config node
enumTypetype of the enum to be converted
valuewhere to set the value back
Returns
bool ConfigNode.TryGetEnum< T > ( string  name,
ref T  value,
defaultValue 
)
inline

Get an enum from a node, and a default value if it fails

Template Parameters
TEnum Type
Parameters
namename of the field in the config node
valuewhere to set the value back
defaultValuewhat to set it to if we fail
Returns
Type Constraints
T :IComparable 
T :IFormattable 
T :IConvertible 
bool ConfigNode.TryGetNode ( string  name,
ref ConfigNode  node 
)
inline

Returns true if the ConfigNode contains a node of the given name, and stores it in the ref value

Parameters
nameName of the node to find
nodeValue to store the result in
bool ConfigNode.TryGetValue ( string  name,
ref string  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a string

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref string[]  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a string array

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref float  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a float

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref double  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a double

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref int  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as an int

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref uint  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as an uint

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref long  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a long

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref ulong  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a ulong

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref bool  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a bool

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref Vector3  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector3

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref Vector3d  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector3d

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref Vector2  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector2

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref Vector2d  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector2d

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref Vector4  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector4

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref Vector4d  value 
)
inline

Returns true if the ConfigNode has the specified value and stores it within the ref as a Vector4d

Parameters
nameName of the value searched for
valueValue to assign
bool ConfigNode.TryGetValue ( string  name,
ref Quaternion  value 
)
inline
bool ConfigNode.TryGetValue ( string  name,
ref QuaternionD  value 
)
inline
bool ConfigNode.TryGetValue ( string  name,
ref Rect  value 
)
inline
bool ConfigNode.TryGetValue ( string  name,
ref Color  value 
)
inline
bool ConfigNode.TryGetValue ( string  name,
ref Color32  value 
)
inline
bool ConfigNode.TryGetValue ( string  name,
ref Guid  value 
)
inline

Tries to get Guid value. This one is courtesy of JPL.

Parameters
name
value
Returns
Guid of the node value or Guid.Empty
static string ConfigNode.WriteBoolArray ( bool[]  flags)
inlinestatic

Returns a comma-separated string for the given bools

static string ConfigNode.WriteColor ( Color  color)
inlinestatic

Returns a comma-separated string for the given color

static string ConfigNode.WriteColor ( Color32  color)
inlinestatic

Returns a comma-separated string for the given color

static string ConfigNode.WriteEnum ( System.Enum  en)
inlinestatic

Returns a comma-separated string for the given color

static string ConfigNode.WriteEnumIntArray< T > ( T[]  flags)
inlinestatic

Returns a comma-separated string for the given enums as ints

Type Constraints
T :struct 
static string ConfigNode.WriteMatrix4x4 ( Matrix4x4  matrix)
inlinestatic

Returns a comma-separated string for the given Matrix4x4

static string ConfigNode.WriteQuaternion ( Quaternion  quaternion)
inlinestatic

Returns a comma-separated string for the given quaternion

static string ConfigNode.WriteQuaternion ( QuaternionD  quaternion)
inlinestatic

Returns a comma-separated string for the given quaternion

static string ConfigNode.WriteStringArray ( string[]  strings)
inlinestatic

Returns a comma-separated string for the given strings

static string ConfigNode.WriteVector ( Vector2  vector)
inlinestatic

Returns a comma-separated string for the given vector

static string ConfigNode.WriteVector ( Vector3  vector)
inlinestatic

Returns a comma-separated string for the given vector

static string ConfigNode.WriteVector ( Vector3d  vector)
inlinestatic

Returns a comma-separated string for the given vector

static string ConfigNode.WriteVector ( Vector4  vector)
inlinestatic

Returns a comma-separated string for the given vector

Member Data Documentation

string ConfigNode.comment = null

The comment, if any, for this node

const string ConfigNode.configTabIndent = "\t"

Default config indent character

************************************* Constructors, ToString, CopyTo *************************************

string ConfigNode.id = ""

ID of this node if given

string ConfigNode.name = ""

Name of this node

Property Documentation

int ConfigNode.CountNodes
get

Returns number of nodes in this node

int ConfigNode.CountValues
get

Returns number of values in this node

bool ConfigNode.HasData
get

Has this config node any data (values or nodes) assigned

ConfigNodeList ConfigNode.nodes
get
ValueList ConfigNode.values
get

The documentation for this class was generated from the following file: