Might want to let Xcode create for you.
This from the docs may explain why it's gone missing (emphasis mine) while still being supported (don't forget to add the SceneKit frwmework)...
Use the Xcode Particle System Editor to Experiment with Particle Systems
In most cases, you don’t need to configure a particle system directly in your app or game. Instead, you use Xcode to configure a particle system’s properties. As you change the behavior of the particle system, Xcode immediately provides an updated visual effect. When complete, Xcode archives the configured system into a file, which you can then include with your project’s bundle resources. Then, at runtime, your game uses this archive to instantiate a new particle system.
Using Xcode to create your particle systems has a few important advantages:
- You can easily learn the capabilities of the particle system class.
- You can experiment quickly with new particle effects and see the results immediately.
- You separate the task of designing a particle effect from the programming task of using it. Your artists can work on new particle effects independent of your game code.
- You can attach a particle system to a node in the Xcode scene editor to preview the particle system in your scene.
To load a particle system from a file you created with Xcode, use the
The problem is that they didn't really point developers in a good way to go from here that I can find. I can't find notes about removing the template in the xcode change files and the documentation points to how to init a particle file in objective C, which isn't awesome (although manageable).
Even when you check out their fox2 demo they released at wwdc 2017 to showcase their changes in scenekit, they used several scnp files within that project, and even the more recent swiftshot demo has at least one scnp file. I'm probably missing something but its frustrating.
>The problem is that they didn't really point developers
Feel free to file bugs/make enhancement requests against the docs in that case, adding your report # to your comment for reference, thanks and good luck.
Thanks KMT, totally missed that bit of the documentation, but I can't find anywhere that explains how to let xcode create the file for me. Previously there was the template option, but there doesn't seem to be another way to create a particle system now other than with code. (Currently I can just copy an old scnp file I have lying around)
Just ran into this problem as well. I didn't have an old file available, so based on this information:
A SceneKit particle file created by Xcode contains an archived SCNParticleSystem instance, so you can also use the NSKeyedArchiver and NSKeyedUnarchiver classes to write and read particle files.
I just created my particle system in a .scn file on a single node in the file. Then wrote a Swift script to extract and archive the attached particle system as a .scnp file.
I guess since once you have a .scnp file it can still be edited in Xcode you could really just instantiate a default SCNParticleSystem and archive that as a reusable template.
Particle System : In .scn file, click "+" button in top right corner, you'll see it just between "Field" and "Action"