Post

Replies

Boosts

Views

Activity

Reply to Possible to batch SKEmitterNodes?
I noticed the same thing, every SKEmitterNode increases the draw call count. Were you able to do anything to batch these draw calls? In my case, all these SKEmitterNodes use the same texture, default blend mode, zero particleColorBlendFactor and have the same targetNode with the same particleZPosition.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Apr ’23
Reply to Xcode 16 beta 5 MainActor errors in a Swift 6 project while working in beta 4
Xcode 16.1 beta seems to be having the same issue. To test, I started from the default "Game" project template with SpriteKit and changed to GameScene.swift file to something simple like this: // GameScene.swift import SpriteKit import GameplayKit class GameScene: SKScene { // GameScene is @MainActor as a subclass of SKNode var label : SKLabelNode = SKLabelNode(text: "Initial text") override func didMove(to view: SKView) { addChild(label) } } @MainActor final class State: GKState { unowned private let scene: GameScene init(scene: GameScene) { self.scene = scene } override func didEnter(from previousState: GKState?) { scene.label.text = "Entered State" // Main actor-isolated property 'label' can not be referenced from a nonisolated context // Main actor-isolated property 'text' can not be mutated from a nonisolated context } } It seems that the @MainActor tag on the class State is not working for methods that were overridden. This is most likely because GKState is not marked so its methods are nonisolated. But what is the solution in this case?
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’24
Reply to Error when clicking on TextField : CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them
I'm seeing the same error with simple text fields. macOS Sonoma 14.6.1, Xcode 16.0 (16A242). CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24