Inspectable Dictionary

$4
Publisher Building Blocks
File size 87.66kB
Number of files 6
Latest version 1.0.0
Latest release date 2022-06-14 12:40:17
First release date 2022-06-14 12:40:17
Supported Unity versions 2018.4.2 or higher

Any Dictionary becomes InspectableDictionary. Add Unity’s [SerializeField] if needed and done.


This means you can view changes to the dictionary at runtime, and still set up the dictionary in the editor in edit mode. No custom editors, no special types, no attributes.


The standard advice is to create serialized lists and feed those into a dictionary at runtime. Why add this complexity each time you want this functionality which in that case will likely not be visible to changes at runtime. This makes using dictionaries easy and intuitive without the over complication of editors, specially declared types, or attributes as seen with other solutions.


This application is meant for overall functionality and not ultimate performance as may be desired when using a dictionary.


Not that there is so much going on to operate, but there is a bit. That’s the only caveat and it’s up to you for your use case. You also maintain complete control over extra functionality with the ability to make changes or versions as needed.


  • Additionally, the dictionary items can be accessed by index using the indexer syntax “TestDictionary[1]”
  • Complete control over implementation.
  • Implicit conversion available between Dictionary and InspectableDictionary.
  • Manual changes in the inspector should not be made at runtime.

Steps to get started:

1. Any dictionary, in a MonoBehaviour, becomes InspectableDictionary.

2. Add Unity’s [SerializeField] attribute if needed.

3. Import the namespace as needed.

4. It is now available in the inspector.

Top Publisher Assets