Skip to main content

NewSaveData<TSavable, TData>

An abstract class in Root.Township, the global namespace.

Base for the current version of a component's save data. Apply hands the data to the component's ISavable<TData>.Load.

Constructors​

MemberWhat it is
protected NewSaveData()Creates a NewSaveData with default values.

Fields​

1 private and internal field
MemberWhat it is
private static Logger loggerLogger for load failures and missing migrations.

Methods​

MemberWhat it is
override bool Apply(object target, ISerializeChildren childSerializer)Calls Load on the target with this data. Logs and returns false if loading throws.
override SaveData Migrate()Logs an error and returns null: the latest version has nothing to migrate to.