SKView showsFields draws only on a portion of the screen

The SKView.showsFields = true only draws on a portion of the screen - nothing shows on the bottom-left.

This can be easily tested using Apple's default game playground. I only removed the action for the Hello World label and added a radialGravityField into the scene.

Also other fields like electricField do not draw anything on the screen.

Tested in Xcode 11.7 and Xcode 12.5.1. Is this a bug in the recent releases?

override func didMove(to view: SKView) {
    // ...
    let field = SKFieldNode.radialGravityField()
    addChild(field)
}

and

sceneView.showsFields = true

Post not yet marked as solved Up vote post of calin Down vote post of calin
1k views

Replies

Hi, what macOS version are you running? It looks like a bug to me, please file a bug report on Feedback assistant with the OS version and hardware type you see this on, along with the sample project that reproduces it. Also post your Feedback number here.

  • Thanks, I will file a bug report now.

    I am running macOS Big Sur Version 11.5.2 (20G95), on a MacBook Pro (Retina, 15-inch, Mid 2014). This happens on both Xcode 11.7 and Xcode 12.5.1, on all simulators (iOS 12, iOS 14) and on an iPhone Xs running iOS 14.8, as far as I tested.

Add a Comment

Looks like there is more to SKView.showsFields. When showsFields is true, if you have an SKFieldNode.customField({}) in the scene, the custom block is called for what appears to be physics bodies to the far top right, with different positions, zero velocity, 1.0 mass, 0.0 charge.

Same, this can be easily replicated using the Game Playground, by adding an SKFieldNode.customField({}) with a block that prints out the arguments.

If SKView.showsFields is false, the block is not called, as it should be.


Feedback report has been updated but there's no update on it.

Found the same bug (showFields property not displaying fields other than SKFieldNode.radialGravityField()) while building a project here in XCode 13.3.1. Already opened a report in Feedback assistant.