Ios 我可以为SCNScene for 3D游戏使用默认的UIViewController吗?或者为什么Xcode默认值会附带UIViewController

Ios 我可以为SCNScene for 3D游戏使用默认的UIViewController吗?或者为什么Xcode默认值会附带UIViewController,ios,xcode,swift,sprite-kit,scenekit,Ios,Xcode,Swift,Sprite Kit,Scenekit,嘿,我正在尝试使用Scenekit制作一个3D游戏,但我不知道我是否可以使用默认类GameViewController:UIViewController,还是需要使用SCNScene import Foundation import AVFoundation import AudioToolbox import QuartzCore import UIKit import SceneKit import SpriteKit import StoreKit import GameKit impor

嘿,我正在尝试使用Scenekit制作一个3D游戏,但我不知道我是否可以使用默认类GameViewController:UIViewController,还是需要使用SCNScene

import Foundation
import AVFoundation
import AudioToolbox
import QuartzCore
import UIKit
import SceneKit
import SpriteKit
import StoreKit
import GameKit
import iAd

class PlayController: UIViewController, ADBannerViewDelegate, SKPhysicsContactDelegate, SKSceneDelegate, SCNSceneRendererDelegate{


override func viewDidLoad() {
    super.viewDidLoad()

我完全同情你的挫折。模板没有遵循文档/参考中描述的场景工具包的约定和范例是荒谬的。你能详细说明什么让你感到困惑吗?我可以让3D场景出现,一切都很好,但我只是在想一个精灵工具包游戏,你使用的是类PlayController:SKScene。但是对于场景工具包,您似乎使用了UIViewController,并最终将其更改为SCNcene,代码为scnView=self.view as!SCNView这是正确的还是最好的方法?将所有协议抽象成一个类来管理游戏状态。老实说,我知道这意味着什么,哈哈,我完全同情你的沮丧。模板没有遵循文档/参考中描述的场景工具包的约定和范例是荒谬的。你能详细说明什么让你感到困惑吗?我可以让3D场景出现,一切都很好,但我只是在想一个精灵工具包游戏,你使用的是类PlayController:SKScene。但是对于场景工具包,您似乎使用了UIViewController,并最终将其更改为SCNcene,代码为scnView=self.view as!SCNView这是正确的还是最好的方法?将所有协议抽象成一个类来管理游戏状态。老实说,我知道这意味着什么哈哈