Setting Particle Collision via C#

using this: Unity - Scripting API: ParticleSystem.CollisionModule.collidesWith
I can only assume it’s possible, but it will not work.

I write:

var c = ps.collision;
c.collidesWith = 1 << 15;

and I get this error:

NullReferenceException: Object reference not set to an instance of an object
PowerCollision.SetTarget (Int32 i)

I’m only doing this because unity’s particle stopping system is suspiciously broken in the first place. These anomalies are setting me back big time and I would hugely appreciate any help.

I ended up avoiding the collision system for unity’s particles all together. I could not get them to work and found myself better off using sphere collider triggers to do my projectile interaction. If anybody has an answer for this, please offer it, but it is no longer pressing, for me.