(iOS beta 5) SpriteKit textureFromNode issues, rasterising a node tree

Hi all,

Developing with SpriteKit,

Had a working game on iOS 8.4 but after upgrading to the beta the SKView method textureFromNode:crop: no longer works, it always returns nil.

textureFromNode: does still work, but isn't a practical solution to the problem.

The pre-release docs- textureFromNode:crop: still say it is supposed to work,

its kind of a vital component of the game I am working on, as sprites are to be "painted" with other sprites,
amassing 100s of painted sprites in seconds it slows the game down unless they are all rasterized using this method.


This is my first major project on iOS and first time using the pre-release beta program, how do these things usually work out?


I'm gonna file a bug report in the morning, just wondering if people have:

a) run into this problem
b) can give me some friendly advice my plan is example project plus device log... how patient might I have to be?


Thanks for reading,

Xanderite

Replies

I'm hitting this problem also in ios 9.1. If you have bug info and insight would love to know. It is a showstopper for my project too! Thanks!

As a workaround I'm currently creating a full texture from the node and then creating a sub texture with a rectangle that represents the sub-section bounds. This sub-section rect needs to be in unit coordinates (0 to 1) so:


let fullTex = self.view?.textureFromNode(theNode)

let smallTex = SKTexture(rect: unitRect, inTexture: fullTex!)


BTW, I tried using a unit rect (instead of node coordinates) with textureFromNode:crop: but still get nil for the SKTexture result.

Hope this workaround helps others. Please let me know if learns more info about this behavior of textureFromNode:crop.


Thanks!

Have a same problem (and much more others with ios9x spriteKit). Apple can you hear us?

👿