Been programming a long tiime but still getting used to swift.
What I need to do is add a has_been_updated flag to all my ARAnchors that can be set by the didUpdate delegate and later cleared by something else.
Not sure of the correct way to do this, if it can be done with extensions and how to apply it to all ARAnchors.
The application, I am sending the ARKit anchor data over UDP to an external (non Apple) device on another computer. Because ARKit updates anchor data very frequently, I want to mark the data as "has been updated" when I get a didUpdate event and then every few seconds iterate over all the anchors and only send the ones that have been updated. This reduces data a lot because in the course of a second something like a meshAnchor might update 10 times.
What would be the appropriate way to add this flag to the ARAnchor class in Swift?