“InvalidCastException: Specified cast is not valid” even when I check for null
I tried to set None in inspector (or set some particles and return them to None) still exception always appear, what’s wrong?

“InvalidCastException: Specified cast is not valid” even when I check for null
I tried to set None in inspector (or set some particles and return them to None) still exception always appear, what’s wrong?

Apparently it was because I used this field as GameObject before instead of ParticleSystem, and it saved it as it is, checks like _particlesAfterDestroyPrefab as ParticleSystem or _particlesAfterDestroyPrefab is ParticleSystem weren’t working still
So I just renamed that field and cleared all previous referenced GameObjects, still this is probably a bug (that checks doesn’t work), if someone could report it, or explain it to me, would be cool