Search Unity

Serially: Adds a SerializableType class and an Editor Interface for [SerializeReference]

Discussion in 'Assets and Asset Store' started by jasonboukheir, Apr 10, 2022.

  1. jasonboukheir

    jasonboukheir

    Joined:
    May 3, 2017
    Posts:
    84
    Hi Everyone,

    I've recently updated https://github.com/CareBoo/Serially to support the latest unity version (2021.2). It provides tools for polymorphic dependency injection in the editor!

    This package adds an inspector to
    [SerializeReference]
    fields that lets you inject any type. It also adds a
    SerializableType
    class that lets you serialize a persistent type reference! Rename the type, move the type around in your project, and the type reference will remain.

    I use
    [Guid()]
    to persist the type reference. Just make sure that attribute stays the same and the type reference will remain. During build time, this guid gets converted to an assembly type reference.
     
  2. theforgot3n1

    theforgot3n1

    Joined:
    Sep 26, 2018
    Posts:
    205
    This is awesome stuff!
    We're going to be using this in our game. :)
    The Guid thing doesn't quite work for me though. I can't find a reference to a Guid attribute. It just finds the `
    System.Runtime.InteropServices` and that's it.
    Perhaps add a "Usages" section to the README in the git repo?