KROYSDOCS
HomeWhat's newv0.1.0
SCRIPTING API / Save games / SaveReader

SaveReader

The save data a script wrote, with the version it was written with.

Kindclass
NamespaceKroys.EngineScripting
Members5
SourceSaveGame.cs
DECLARATION

Declaration

Namespace Kroys.EngineScripting.

Declaration
public sealed class SaveReader
REFERENCE

Members

Properties
#public int Version { get; }
The ISaveable.SaveVersion the data was written with.
property
#public IReadOnlyCollection<string> Keys { get; }
The stored keys.
property
Methods
#public bool Has(string key)
Whether a value is stored under key.
method
#public bool TryGet<T>(string key, out T value)
Reads a value; false when it is absent or has another type.
method
#public T Get<T>(string key, T fallback = default!)
Reads a value, or fallback when it is absent or has another type.
method
Signatures
public int Version { get; }
public IReadOnlyCollection<string> Keys { get; }
public bool Has(string key)
public bool TryGet<T>(string key, out T value)
public T Get<T>(string key, T fallback = default!)

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.