Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/careboo/serially
- Owner: CareBoo
- License: mit
- Created: 2020-06-18T05:35:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-02T16:43:04.000Z (about 1 year ago)
- Last Synced: 2024-10-10T10:23:16.599Z (4 months ago)
- Topics: openupm, serializer, unity, unity-asset, unity-editor, unity-package, unity-package-manager, unity-scripts, upm
- Language: C#
- Homepage:
- Size: 2.9 MB
- Stars: 40
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
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).