Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Feedback Serially <> SerializableType and SerializeReference Inspector

Discussion in 'Works In Progress - Archive' started by jasonboukheir, Jul 30, 2020.

  1. jasonboukheir

    jasonboukheir

    Joined:
    May 3, 2017
    Posts:
    69
    SerializableTypeDrawer.png ShowSerializeReferenceDrawer.png TypePickerWindow.png

    Check it out here: https://github.com/CareBoo/Serially

    Includes a much-needed inspector for
    SerializeReference
    fields, inspired by
    UnityEngine.Object
    inspector, and a
    SerializableType
    class that lets you serialize
    System.Type
    references. Nothing new here, there are already projects that do these things, I just wanted to add my own opinion to it.

    Cool features:
    • Add a
      ProvideSourceInfo
      attribute to your class to allow editor pinging when you click on the type in the inspector.
    • Add a
      Guid
      attribute to your class, and when you rename your class, your
      SerializableType
      fields won't lose their references.
    • Small runtime improvements: Attributes are editor-only, and get removed when making a build. The type guid reference is replaced with the type assembly name during a build.
    Upcoming features (Feedback?):
    • Split the two features into separate packages. What was I thinking?
    • Allow copying/pasting a
      SerializeReference
      field via right click.
    • Add a tab to the SerializeReference Picker Window
     

    Attached Files:

unityunity