Version 2.1.0.0

PreviouslySerializedAsAttribute class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public class PreviouslySerializedAsAttribute : Attribute, _Attribute
Indicates that an instance field or auto-property was previously serialized with a different name, so that values serialized with the old name will be properly deserialized into this member. This does the same as Unity's FormerlySerializedAs attribute, except it can also be applied to properties.
Inheritance
  • System.Object
  • System.Attribute
  • PreviouslySerializedAsAttribute
See Also
  • System.Attribute

Constructors

PreviouslySerializedAsAttribute(String)
Initializes a new instance of the PreviouslySerializedAsAttribute class.
public PreviouslySerializedAsAttribute(string name)
Parameters
System.String name

The former name.

Properties

Name
The former name.
public string Name { get; }

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.