[Error][Physics.PhysX] PxPhysics::createMaterial: limit of 64K materials reached

Being getting the following error lately

[Error][Physics.PhysX] PxPhysics::createMaterial: limit of 64K materials reached..

Stack trace points me to the following line:

            if (Collider.material != material)
            {
                Collider.material = material;
            }

In which I set a collider’s physic material.

Can anyone assist with this?

.material getter creates a clone. Read from shared material instead.

1 Like