项目作者: CareBoo

项目描述 :
Adds a unity-supported, SerializableType class and an inspector for editing SerializeReference fields.
高级语言: C#
项目地址: git://github.com/CareBoo/Serially.git
创建时间: 2020-06-18T05:35:21Z
项目社区:https://github.com/CareBoo/Serially

开源协议:MIT License

下载



Serially























Extends the Unity Editor with type picking functionalities.

Usage

ShowSerializeReferenceAttribute

ShowSerializeReferenceAttribute

Use the ShowSerializeReferenceAttribute on a serializable field with SerializeReference to add a type picker inspector to that field.

  1. using UnityEngine;
  2. using CareBoo.Serially;
  3. public class MyBehavior : MonoBehaviour
  4. {
  5. [SerializeReference, ShowSerializeReference]
  6. public IPet myPet;
  7. }

SerializableType

SerializableType

Serialize any type with SerializableType class.

  1. using UnityEngine;
  2. using CareBoo.Serially;
  3. public class MyBehaviour : MonoBehaviour
  4. {
  5. public SerializableType myType;
  6. private void Start()
  7. {
  8. Debug.Log("Serialized type is " + myType.Type.FullName);
  9. }
  10. }

Installation

Scoped Registries

Registry URL
NPM https://registry.npmjs.org/
OpenUPM https://package.openupm.com

This project can be installed as a UPM package on OpenUPM
or npmjs by adding those as scoped registries. See the Unity manual for more information on Scoped Registries.

Local Packages

Alternatively, you can install this directly as either a tarball or unity asset package from
the latest release.

Documentation

Documentation is hosted here on GitHub pages.