---
description: 9_ScriptableDictionaries
---

# Scene Set up

In this scene, there are 4 Elements spawners. Press play and start clicking on each of the buttons at the top: Spawn Air, Spawn Fire, Spawn Water, Spawn Earth.&#x20;

<figure><img src="https://1391552916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqhD9b0UbiZjyC9B8azX%2Fuploads%2FQVqN9WK1UuL8wpGzz3ya%2Fimage.png?alt=media&#x26;token=dd4581fe-1720-4340-a5d2-268023afe60f" alt="" width="375"><figcaption></figcaption></figure>

As you can see, elements objects are being spawned and the UI updates with the count of each.&#x20;

This is achieved using a ScriptableDictionaryElementInt : ScriptableDictionary\<ScriptableEnumElement, int>.

Note: ScriptableList and ScriptableDictionary both inherit from ScriptableCollection. Therefore, they both share some common functonalities. You can basically use the Scriptable Dictionary as you would a regular dictionary (iteration, methods names , etc...).&#x20;
