I have a custom class that contains an SKTileMapNode (named "gmap") as a member variable. I want to use the .color property to recolor the Node depending on user interaction. Im using the following code to change the color. (using different UIColors as needed)
self.gmap.color = UIColor(red: 0.4, green: 0.65, blue: 0.125, alpha: 1)
self.gmap.colorBlendFactor = 1.0
This method works fine when i recolor the node within the initializer of my custom class but doesn't work when used anywhere else. (the node still appears correctly but its color does not change) Any idea whats going wrong here? Can an SKTileMapNode not be recolored after its intialized or something? Thanks for any help.
EDIT: I didn't find an answer but i found a work around by removing the node and adding a new one. See my answer below for a full explanation.