Skip to content

FormerNameAttribute

namespace Griff.Scenes;
public sealed class FormerNameAttribute : Attribute

An earlier name, so scenes saved before a rename keep their values. On a component: the name it was saved under, e.g. [FormerName("Enemy")] on a class renamed to Foe (a name without a namespace also matches one in the class’s own namespace). On a property: its earlier name in code, e.g. [FormerName("Speed")] on MoveSpeed. On an [Action] method or an [Output]: the name it had, so every trigger, button, counter, wire and condition that still names it keeps working. On a script’s field, or on a class its fields hold: the name it had, so saved games keep its value (see ISavesState). Scenes load under either name and save under the new one. A component, property, action or output can have several.

public string Name { get; }