2

我在 Scene Kit 中使用了一个 overlaySKScene。在那个 SKScene 中,我使用遮罩节点来裁剪 SKCropNode。掩码节点在 Mac OS X 上运行时完美运行,但当我在 iOS 上运行时它不起作用。

我认为这是因为 iOS 忽略了兄弟顺序,并且掩码节点显示在 SKCropNode 后面。当我尝试设置

view.ignoreSiblingOrder = NO;

在 SKScene 中,它崩溃并说:

[GameView setIgnoresSiblingOrder:]: unrecognized selector sent to instance

GameView 是 SCNView 的子类,所以我知道 SCNView 没有“ignoreSiblingOrder”属性。

我该如何解决这个问题?我是以错误的方式接近这个吗?在 iOS 上运行时,它是 Scene Kit 中的错误吗?

4

0 回答 0