IgnoreCollision and particle systems

Let’s say I have a spaceship that fires a beam made of particles at another ship. I want the particles to collide with the target but not the ship that fired it.

Normally, you’d use collision layers for this. However, there are arbitrarily many ships in the game and a limited number of layers. Is it possible to either add new layers at runtime or use IgnoreCollision with particle systems?

When a collision occurs you can check if it collides with the spaceship that generated it and ignore that collision and perform your collision tasks when it collides with the target spacechip only.