I don't know how it is in unity, but in Godot you set one-way platforms via the platform not the character.
Unity does have one way platform available quite readily. The problem is I didn't use Unity's physics system. Instead I used a custom one, which is difficult to integrate with Unity's colliders and such