Unclaimed Package Is this your package? Claim it to unlock full analytics and manage your listing.
Claim This Package

Install via UPM

Add to Unity Package Manager using this URL

https://www.pkglnk.dev/extended-dictionary.git

README Markdown

Copy this to your project's README.md

Style
Preview
pkglnk installs badge
## Installation

Add **Extended Dictionary** to your Unity project via Package Manager:

1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/extended-dictionary.git
```

[![pkglnk](https://www.pkglnk.dev/badge/extended-dictionary.svg?style=pkglnk)](https://www.pkglnk.dev/pkg/extended-dictionary)

README

Unity-Extended-Dictionary

Unity Package that provides extended Dictionary class with support for polymorphic serialization and editing in the inspector.

[!NOTE] Requires Unity 2021.3 or newer.

Inspector Dictionary

Setup

In Unity Package Manager select Add Package from git URL... and add following URL

https://github.com/ikold/Unity-Extended-Dictionary.git

To use serialized dictionary and have it show up for editing in the inspector use class SDictionary<TKey, TValue> the same way as you would use C# Dictionary<TKey, TValue>. It inherits from it and has access to the same methods.

using ExtendedDictionary;
using UnityEngine;

public class CustomMonoBehaviour : MonoBehaviour
{
    public SDictionary<object, object> Parameters = new SDictionary<object, object>
    {
        { "row 1", 1 },
        { 2.2, "string" },
        { 3, null }
    };
}

Features:

  • Polymorphic serialization (can be used with Unity Objects)
  • Prefab support
  • Inspector:
    • Type selector for keys and values
    • Visual data validation
    • Support of Unity Object references
    • Adding and removing dictionary entries

Comments

No comments yet. Be the first!