Special Collider?

how can i make a collider for a cube which the player can go through but the cube can’t move through another cube?

Physics.IgnoreLayerCollision(specialCubeLayer, playerLayer, true);

specialCubeLayer and playerLayer are the layer numbers of the objects. Useful if you have multiple objects on both layers.

or in the player or cube script

Physics.IgnoreCollision(cubeCollider, playerCollider);

cubeCollider and playerCollider are the collider components of your objects. Useful if you have one specific cube and one specific player

this will make the physics system ignoring collision between these two objects