2016-08-26 16 views
1

私は最近、最新のXcode 8 beta 6にアップデートしました。以前はベータ4でした(私は思っています)。私は自分のコードをコンパイルしようとしたと、このエラーを得た:ここXcode 8 Beta 6の奇妙なSceneKitリンカエラー

enter image description here

は抜粋です:

private func setupPlane() { 

    // create plane geometry with size and material properties 
    let myPlane = SCNPlane(width: 10000.0, height: 10000.0) 
    myPlane.firstMaterial!.diffuse.contents = NSColor.orange.cgColor 
    myPlane.firstMaterial!.specular.contents = NSColor.white.cgColor 

    // intialize noe 
    let planeNode = SCNNode() 
    // assign plane geometry to the node 
    planeNode.geometry = myPlane 

    // rotate -90.0 about the x-axis 
    let rotMat = SCNMatrix4MakeRotation(-CGFloat(M_PI/3.0), 1.0, 0.0, 0.0) 
    planeNode.transform = rotMat 
    planeNode.position = SCNVector3Make(0.0, 0.0, 0.0) 

    // setup the node's physics body property 
    planeNode.physicsBody = SCNPhysicsBody(type: .static, shape: SCNPhysicsShape(geometry: myPlane, options: nil)) 
    planeNode.physicsBody!.categoryBitMask = PhysicsMask3DOF.plane.rawValue 

    // add to scene 
    sceneView.scene!.rootNode.addChildNode(planeNode) 
} 

私は物理学の体が割り当てられている2行をコメントアウトして、そのカテゴリがある場合設定すると、コードはゼロエラーでコンパイルされます。私は、エラーが何を示そうとしているのか、本当に明確ではない。どんな提案も大変ありがとうございます。

答えて

2

これはコンパイラの既知の問題です。 回避策としては、nilの代わりに[:]を使用することができます:あなたが会う場合

SCNPhysicsShape(geometry: myPlane, options: [:]) 
+0

が、私はあなたにビールを借りて!それはそれを修正!私は午前1時30分まで、ESTの情報源を見つけようとしていました。 – xBACP

+0

あなたはバグが何であるかを詳述できますか?それはちょうど8ベータ6ですか?それは他の状況でも起こりますか? –

+0

こちらで詳しく知ることができます:https://github.com/apple/swift/pull/4299 – mnuages

関連する問題