Serialize Interfaces!

Why?
SerializeReference from Unity already allows you to store plain structs and objects with the specified interface, but not Unity Objects. "Serialize References!" is here to solve this problem.

What does it do?
This is for the coders. Quickly serialize references to Unity Objects like MonoBehaviour, ScriptableObject and more, that implement the specified interface. It's super easy and works out-of-the-box with a custom object picker that filters your project and hierarchy in a smart way. You can pick between the class to serialize it or an attribute to decorate the field with the required validation. I'ts free, lightweight and open source. Give it a try!
How does it help me?
For one, you can finally use interfaces on your MonoBehaviours. Another big benefit is that it allows you to rethink how you architect your game: You can reference either a MonoBehaviour or Scriptable Object that implement the given interface. This allows you to either reference a scene component or a project asset, while still expecting a specified functionality/interface. This opens up new ways to think about code and project architecture.

Release Notes

- Fixed an error when trying to drag and drog a Component onto a Scriptable Object field

- Interface now only shows when hovering or when empty so the actual reference is more readable

Basic Information
Latest Version
1.1.4 (16 Aug 2022)
Publisher
ayellowpaper
Category
Tools/Utilities
Size
31.0 KB
Price
free
Asset Rating
(26)
Extended Information
Unity Versions
2020.1.17
State
Published