Unity logo
取消
购物车
应用
Sell Assets

11000+款5星资源

8.5万+用户参与评分

10万+社区成员鼎力支持

每款资源都经过 Unity 审核

首页
工具
实用工具
1/6
Reference and serialize Unity Objects with a specified interface
描述

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.

技术细节

- Reference and serialize UnityEngine.Objects that implement a given interface

- Drag and drop in the inspector

- Inspector Validation

- Custom Object Selector that scans for interfaces in your project and scene

- Works with List<> and Array

Serialize Interfaces!

(25)
124 users have favourite this asset
(124)
FREE
许可证类型
文件大小
31.0 KB
最新版本
1.1.4
最新发布日期
2022年8月16日
原始 Unity 版本
2020.1.17
高品质资源
11000+款5星资源
深受用户信赖
8.5万+用户参与评分
强大的社区支持
10万+社区成员鼎力支持
Unity logo
语言
反馈
合作伙伴计划
合作伙伴
USD
EUR
Copyright © 2025 Unity Technologies
所有价格不包含税
USD
EUR