Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Notifying Containers (Array & Dictionary)

An asset by CookieCherith
The page banner background of a mountain and forest
Notifying Containers (Array & Dictionary) thumbnail image
Notifying Containers (Array & Dictionary) thumbnail image
Notifying Containers (Array & Dictionary) hero image

Quick Information

0 ratings
Notifying Containers (Array & Dictionary) icon image
CookieCherith
Notifying Containers (Array & Dictionary)

Adds wrappers for Containers (Arrays/Dictionaries) that emit the changed signal when their contents are modified.

Supported Engine Version
4.4
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
7 hours ago
Git URL
Issue URL

godot-notifying-containers

A Godot plugin that adds Wrapper Classes for Containers (Arrays/Dictionaries) that emit the changed signal when their contents are modified.

Usage

Runtime:

  1. Create a new container with Notifying[Array/Dictionary].new(). You can also pass in initial data and type strings when you create the Container.
  2. Connect to the changed signal.
  3. Use the provided functions to interface with the array.

Editor:

  1. Add @export var container: Notifying[Array/Dictionary] to your script.
  2. Set static type in the Inspector via the Type String properties.
  3. Set values in the Inspector via the Data property. Changes in the inspector will still emit the changed signal, so your @tool scripts can make use of this.

Notes

  • The get() and set() functions are renamed to get_at() and set_at() to avoid conflicts with Object.get() and Object.set().
  • The changed signal is only emitted when the internal Container is modified through the provided functions, not when it's modified directly, or when any item within the Container (such as a nested Array or Resource) is directly modified.
  • Unlike regular Containers, static type cannot be set at compile time, meaning you cannot set the static type for a default exported value unless your script uses the @tool annotation. This can be worked around by setting the static type in the inspector.
  • Strings may behave weirdly in the Inspector, losing focus after every change. I've sadly not yet found a way to fix this short of re-implementing the entire Array/Dictionary Property Editor.

Adds wrappers for Containers (Arrays/Dictionaries) that emit the changed signal when their contents are modified.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Notifying Containers (Array & Dictionary) icon image
CookieCherith
Notifying Containers (Array & Dictionary)

Adds wrappers for Containers (Arrays/Dictionaries) that emit the changed signal when their contents are modified.

Supported Engine Version
4.4
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
7 hours ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers