I’m using the following line of code to Create a sprite from a texture.
Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), pivot, 100f, 1, meshType, new Vector4(), true);
I’ve set the last parameter ‘generateFallbackPhysicsShape’ to true to ensure a Physics shape is generated. This works fine when I enter playmode from the Editor. However, after I build the game, the physics shape won’t be generated at all.
Does anyone have an idea why this doesn’t work after building the game, and perhaps a way to work around it?