Is your feature request related to a problem? Please describe.
Not a problem, but this would be a nice enhancement and would improve consistency.
Describe the solution you'd like
I would like a wrapper around Godot's GDictionary (similar to ObjectCollection being a typed wrapper around GArray), let's say ObjectDictionary<Key,Value>.
Describe alternatives you've considered
Alternative currently is to deal with GDictionary directly, you could write your own extension which could attempt to unwrap the type you know you stored (but this isn't nearly as safe) similar to boolForKey(), intForKey(), etc in UserDefaults or make something like value<T>forKey() -> T?.
Additional context
I would use this immediately and interacting with dictionaries is a common enough use case that this would probably see heavy use with most others.
Is your feature request related to a problem? Please describe. Not a problem, but this would be a nice enhancement and would improve consistency.
Describe the solution you'd like I would like a wrapper around Godot's GDictionary (similar to ObjectCollection being a typed wrapper around GArray), let's say
ObjectDictionary<Key,Value>
.Describe alternatives you've considered Alternative currently is to deal with GDictionary directly, you could write your own extension which could attempt to unwrap the type you know you stored (but this isn't nearly as safe) similar to
boolForKey()
,intForKey()
, etc inUserDefaults
or make something likevalue<T>forKey() -> T?
.Additional context I would use this immediately and interacting with dictionaries is a common enough use case that this would probably see heavy use with most others.