Button stops working after pausing+unpausing
Hey everybody,
today i came across a weird bug, i can't resolve.
I have a buy/equip/unequip-button in my main menu. There are all sorts of other buttons in this scene but this is the most complex one since it covers multiple functions. When i pause and unpause the scene, the button stops working (leaving the scene repairs it). I discovered this through the iap scene-pausing but then i tested it with a simpel pause scene in which absolutely nothing happens except the unpausing-behavior and the same thing happened. Are there any behaviors that could be "destroyed" by pausing the scene or any know issues with the whole pausing behavior?
today i came across a weird bug, i can't resolve.
I have a buy/equip/unequip-button in my main menu. There are all sorts of other buttons in this scene but this is the most complex one since it covers multiple functions. When i pause and unpause the scene, the button stops working (leaving the scene repairs it). I discovered this through the iap scene-pausing but then i tested it with a simpel pause scene in which absolutely nothing happens except the unpausing-behavior and the same thing happened. Are there any behaviors that could be "destroyed" by pausing the scene or any know issues with the whole pausing behavior?
Best Answer
-
calvin9403 Posts: 3,186
In your otherwise put a timer .1 second and chande attribute
Btw why don't u use when touch is pressed,do something?
Answers
I set my buttons up like this:
rule 1: when touch is pressed change self.down to true - otherwise change self.down to false
rule 2: when touch is released and when self.down is true - trigger what i want the button to do
This works without a problem. But after pausing and pausing a scene it stops working. I replicated this in a new project to check if i'm right.
Is this a known bug? Is this me being stupid somehow?
Plus: How could i avoid this?