Correctly handling widget creation and removal

Yeah well, as I said, there can be an unknown number of those markers, which I have to add/remove dynamically. Nothing I can know beforehand, or reuse, unless - as mentioned above - I would implement a rather complex logic of reusing invisible but already constructed widgets.

Also I don’t know how referencing widgets in a variable would help; I have no issues finding the widgets, and un-parenting already un-parented widgets is not an issue, so I just ignore the fact that widgets remain accessible.

Okay so long story short:

  1. No way to iterate canvas children means I have to use “Get All Widgets Of Class”

  2. No way of destroying a widget, thus they will reside in memory until garbage collected eventually

  3. I will optimise the marker for the horse to be reusable, the other markers will suffer from accumulating in the background and there’s nothing I can do about it

  4. Hopefully it will not make a big impact, since during game time a player might maybe a have a hand ful of markers, and its done client-side.

I guess I won’t run into any issues here. It just does not “feel” clean :slight_smile: