GameFilesWriteToFileT Method |
Writes the given object instance to a file.
Object type (and all child types) must be decorated with the [Serializable] attribute.
To prevent a variable from being serialized, decorate it with the [NonSerialized] attribute; cannot be applied to properties.
Namespace:
GeonBit.Managers
Assembly:
GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public void WriteToFile<T>(
GameFilesFileFormats format,
string filePath,
T objectToWrite,
bool append = false
)
Parameters
- format
- Type: GeonBit.ManagersGameFilesFileFormats
Which format to use with this file. - filePath
- Type: SystemString
The file path to write the object instance to. - objectToWrite
- Type: T
The object instance to write to the file. - append (Optional)
- Type: SystemBoolean
If false the file will be overwritten if it already exists. If true the contents will be appended to the file.
Type Parameters
- T
- The type of object being written to the file.
See Also