sprite kit - How to choose which scene shows up first spritekit/swift? -


where declared scene show first on load of app? first file made game shows first, if i'm wanting switch main menu pops first, how , do that?

thanks

in view controller, first scene set. default, it's automatically set gamescene can change altering code in gamescene. should change line in unarchive file: let scene = archiver.decodeobjectforkey(nskeyedarchiverootobjectkey) as! gamescene let scene = archiver.decodeobjectforkey(nskeyedarchiverootobjectkey) as! scenename , line in didmovetoview if let scene = gamescene.unarchivefromfile("gamescene") as? gamescene { if let scene = gamescene.unarchivefromfile("gamescene") as? scenename { cause game load scenename, or whatever scene called initial scene.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -