Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

219
Vistas
Renaming Serialized Auto-Properties in Unity

I have a auto-property that is serialized on the Inspector and i need to rename it without loosing the serialized value, normally i would use the [FormerlySerializedAs(previousName)] attribute for this, the problem is that it's not working with auto-properties, does anybody have any insight on this?

My code:

public class Test : MonoBehaviour
{
    [field: SerializeField]
    [field: FormerlySerializedAs("previousName")]
    public Transform FieldIWantToRemainSerialized { get; private set; }
}
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Little late, but maybe someone will find that usefull, you need to use this:

[field: FormerlySerializedAs("<previousName>k__BackingField")]
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda