Class FormerlySerializedAsAttribute
Use this attribute to rename a field without losing its serialized value.
Namespace: UnityEngine.Serialization
Syntax
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = false)]
public class FormerlySerializedAsAttribute : Attribute, _Attribute
Constructors
FormerlySerializedAsAttribute(String)
Declaration
public FormerlySerializedAsAttribute(string oldName)
Parameters
Type | Name | Description |
---|---|---|
String | oldName | The name of the field before renaming. |
Properties
oldName
The name of the field before the rename.
Declaration
public string oldName { get; }
Property Value
Type | Description |
---|---|
String |