0
  1. I've created a ".sks" file.

  2. I've configured the effect in the editor.

  3. I've added import SpriteKit in a swift view file.

Apple's documentation shows this snippet (but I don't know how to use it properly):

func newSmokeEmitter() -> SKEmitterNode? { return SKEmitterNode(fileNamed: "smoke.sks") }

I've seen this and this, but they didn't solve my problem either. Does SpriteKit require that you configure your app as a) a game and b) SpriteKit, or can it be done in my single-page app? Thanks for your help!

West1
  • 1,430
  • 16
  • 27
  • If you're doing this in SwiftUI (as the tags suggest) this might help you: [Using SpriteKit inside SwiftUI](https://stackoverflow.com/q/56615183/8697793) (specifically [this answer](https://stackoverflow.com/a/63367054/8697793) if in SwiftUI 2.0). – pawello2222 Aug 28 '20 at 21:10
  • @pawello2222 That question is for a "game" configured for SpriteKit. My app is a single-page app. – West1 Aug 28 '20 at 21:15
  • The answer for SwiftUI 2.0 should work in a single-page app as well (if you use SwiftUI 2.0). – pawello2222 Aug 28 '20 at 21:17
  • @pawello2222 Ok thanks for your input! I'll look into it. – West1 Aug 28 '20 at 21:17

0 Answers0