How to turn off user interaction of child node when parent node has it enabled in SpriteKit
问题 I have an SKNode that has user interaction enabled and I am adding an SKEmitterNode to that and I want the user interaction to be disabled for just the child. This code does not work. SKNode* parentNode = [[SKNode alloc] init]; parentNode.userInteractionEnabled = YES; NSString* path = [[NSBundle mainBundle] pathForResource:@"ABCDEFG" ofType:@"xyz"]; SKEmitterNode* childNode = [NSKeyedUnarchiver unarchiveObjectWithFile:path]; childNode.userInteractionEnabled = NO; [parentNode addChild