Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Allow System.Object typed fields with [SerializeReference] attribute to be serialized

Discussion in '2020.1 Beta' started by jasonatkaruna, Mar 10, 2020.

  1. jasonatkaruna

    jasonatkaruna

    Joined:
    Feb 26, 2019
    Posts:
    64
    For those stumbling on this thread, not serializing static type System.Object was a bug and fixed in the latest beta build.
     
    Last edited: Mar 13, 2020
  2. GamerXP

    GamerXP

    Joined:
    Mar 22, 2014
    Posts:
    76
    When exactly was it fixed? 2021.3.30 still not serializing System.Object fields.

    Basically, what I'm trying to do:

    [SerializeReference]
    public object Value = "100";

    To serialize any possible type of objects in the field. But it resets to default value on script reload (default for type, not default that was initialized in the field for some reason)

    Edit: Just tested it with 2023.2.0a22 - still not working
     
    Last edited: Oct 6, 2023