UpgradeFromAttribute
namespace Griff.Scenes;
public sealed class UpgradeFromAttribute : AttributeMarks a static method static void Name(SavedData data) on a component as the step that upgrades its saved data from Version to the next (see ComponentVersionAttribute), e.g. [UpgradeFrom(1)] static void SecondsToFrames(SavedData data) => data.Set("Delay", data.Get<float>("Delay") * 60); Steps run in order, oldest first, before the values are read, and see each property under the name it has now (values saved under a FormerNameAttribute are moved to it first).
Properties
Section titled “Properties”Version
Section titled “Version”public int Version { get; }