Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/careboo/serially

Adds a unity-supported, SerializableType class and an inspector for editing SerializeReference fields.
https://github.com/careboo/serially

openupm serializer unity unity-asset unity-editor unity-package unity-package-manager unity-scripts upm

Last synced: 4 months ago
JSON representation

Adds a unity-supported, SerializableType class and an inspector for editing SerializeReference fields.

Awesome Lists containing this project

README

        


Serially


















Extends the Unity Editor with type picking functionalities.

- [Usage](#usage)
- [`ShowSerializeReferenceAttribute`](#showserializereferenceattribute)
- [`SerializableType`](#serializabletype)
- [Installation](#installation)
- [Scoped Registries](#scoped-registries)
- [Local Packages](#local-packages)
- [Documentation](#documentation)

## Usage

### `ShowSerializeReferenceAttribute`

![ShowSerializeReferenceAttribute](Documentation~/images/ShowSerializeReferenceDrawer.png)

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

```cs
using UnityEngine;
using CareBoo.Serially;

public class MyBehavior : MonoBehaviour
{
[SerializeReference, ShowSerializeReference]
public IPet myPet;
}
```

### `SerializableType`

![SerializableType](Documentation~/images/SerializableTypeDrawer.png)

Serialize any type with `SerializableType` class.

```cs
using UnityEngine;
using CareBoo.Serially;

public class MyBehaviour : MonoBehaviour
{
public SerializableType myType;

private void Start()
{
Debug.Log("Serialized type is " + myType.Type.FullName);
}
}
```

## 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](https://openupm.com/packages/com.careboo.serially/)
or [npmjs](https://www.npmjs.com/package/com.careboo.serially) by adding those as scoped registries. [See the Unity manual](https://docs.unity3d.com/Manual/upm-scoped.html) 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](https://github.com/CareBoo/Serially/releases/latest).

## Documentation

Documentation is hosted [here on GitHub pages](https://careboo.github.io/Serially/2.2).