bevy
bevy copied to clipboard
Add a `remove` method to the `Map` reflection trait
What problem does this solve or what need does it fill?
There is currently no way to remove an entry from a dyn Map other than through downcasting.
What solution would you like?
Add a remove method to the Map trait which takes in an &dyn Reflect key and returns an Option<Box<dyn Reflect>> representing the value removed (if present).
What alternative(s) have you considered?
Leave as is, require downcasting to remove entries.
Additional context
As discussed with @MrGVSV on discord. Compliments the work done in #5797 (List::pop).