Adding SCNScene to SwiftPM project

I need some help adding an .scn file to my submission for this year. I've tried creating an art.scnassets file from xcode within the project, adding the .scn file and trying to use it with SCNScene(named: "scene.scn"), but I get a blank SCNView and printing value of the SCNScene, I get nil. Please help in this context ASAP.

Answered by Manas Malla in 711133022

Oops 😅 ! I've got it, and for anyone who's working hitting their heads on the same:

Dragging and dropping the scn file into the project directory in the sidebar of Xcode will automatically create a Resources folder with the scene. You can then initialize the scene as an SCNScene as SCNScene(named: "scene.scn")

Accepted Answer

Oops 😅 ! I've got it, and for anyone who's working hitting their heads on the same:

Dragging and dropping the scn file into the project directory in the sidebar of Xcode will automatically create a Resources folder with the scene. You can then initialize the scene as an SCNScene as SCNScene(named: "scene.scn")

Adding SCNScene to SwiftPM project
 
 
Q