Force-Update friction?

I’m creating a 2D Platformer with physics, the way it is outlined in the tutorial. Like many others on here, I have the problem of the player getting stuck on walls when jumping, due to the friction on both objects. After messing around a bit I found an efficient way of (theoretically) getting around it - only it doesn’t work as it should.

Basically what I did is set the friction of the player object’s physics material to 0 when it’s in the air and restores it once it is back on the ground. The change of friction works, according to the inspector; the problem however is that the engine does not apply the change immediately. What I mean by that: The player jumps, friction is set to 0. When the player hits the wall he gets stuck regardless because the engine apparently still thinks the friction is 1.

So my question is: Is there a way/workaround to have the engine apply the friction changes immediately? I know from tests that setting the friction of one of the objects to 0 helps, I just have to find a convenient way to handle it.

If you ask me, there’s still something wrong with your setup.
If you want to use physics, configure the materials how you want them to behave - put the right friction on the materials and configure your player with the right mass. If you haven’t changed that… a 1.5m high player that weighs 1kg may be the problem.
I think you shouldn’t try to hack around the physics if you haven’t tried solutions within the system first.
Also, there is multi-object-editing to change materials on multiple objects and for the material you already used - that’s referenced anyway, so you just have to change at one point.

Even if you still can’t do it manually, because you have too many GOs in multiple levels already…
I’d rather write an editor script than to build an unnecessary hack into the game that will stay there forever and only makes it hard to change the game later if you want hanging from ledges or sliding down walls or wall jumps etc…