0

When running my game on device, I see the following warning in the debug log:

The ParticleSystem uses a gravityModifier, but the Physics Module is stripped, so using a default value of 9.81m/sec/sec for gravity. Disable stripping in Player Settings to fix this.

(Filename: ./Modules/ParticleSystem/Modules/InitialModule.cpp Line: 58)

I've already a solution in place for preventing other Unity classes from being stripped (different types of colliders). However, I don't know what "Physics Module" this is referring to, so I don't know how to solve the problem.

  • I don't want to disable stripping - it's a good thing. I just want to prevent this specific module from being stripped, which I usually do by specifically interacting with it in a startup scene (as I've done to solve the other problems).
  • I don't see any Physics module on a Particle System.
  • I tried including a particle system with all modules enabled in the startup scene, but the "Physics Module" is still being stripped.
  • I searched this error online and didn't find anything useful.

How can I prevent this from being stripped, so my gravity modifications can work fine?

Bilal Akil
  • 4,716
  • 5
  • 32
  • 52

1 Answers1

0

Turns out that although this is a 2D game, and 2D physics is used everywhere, it seemed to be referring to the 3D physics module that's being stripped.

I tried adding a RB/3D collider to my loading scene prevent a theoretical 3D physics module from being stripped, and now we're good!

Interesting that I needed to include the entire 3D physics module to solve this problem in a 2D game... Would be great if that wasn't necessary!

Bilal Akil
  • 4,716
  • 5
  • 32
  • 52
  • Well particle system is always 3D so yeah you will need the 3D physics in order to compute it ;) some assets like a ParticleSystem2D exist .. but not for free so I won't add links here ;) – derHugo Dec 27 '19 at 17:34
  • That's interesting, because they do have some explicitly 2D things in there, like sorting layers for the renderer ‍♂️ Also seems to work with 2D collision – Bilal Akil Dec 28 '19 at 13:09