Reputation: 10664
I am having this weird problem with my game menu when I use SKShapeNodes instead of SKSpriteNodes. The menu is basically a subclass of SKNode and just has different SkSpriteNodes as buttons, its pretty straight forward.
Recently I changed the SKSpriteNode buttons to SKShapeNodes because it gives me some extra benefits (rounded corners, strokes etc). However the problem now starts when the game menu is shown.
Basically if a press the "homeScreen/Main Menu" button in my game menu a scene transition happens to another SKScene. The issue is that when the scene transition finished I can briefly still see the SKShapeNode buttons for like 1-2 seconds and than they disappear. Sometimes its just the buttons, sometimes it is the menu also. It sort of looks like LCD screen burn. Whats even weirder is that if I only use 1 SKShapeNode button and the others are SKSpriteNodes the effects is the same, all buttons briefly show after the scene transition.
Using only SkSpriteNodes and this does not happen. Changing the scene transition style seems to make no difference too. Has anyone had the same problem or maybe know what could cause this? Thanks for any help or support.
Upvotes: 2
Views: 58
Reputation: 10664
So after more reasearch it turns out that SKShapeNodes are notorious for memory leaks and performance issue. In my case I was simply using to many SKShapeNodes. Solution is to either reduce SKShapeNodes count or using alternatives such as SKSpritenode.
Upvotes: 1