Real Sized Texture Tiling

Newbie question here. I’m making a (very) basic level geometry using textured cubes/rectangles of different sizes. The texture I’m using for said cubes is made up of a repeating square pattern. However, I can’t make this texture resize properly on the cubes. The sizes of the cubes will all be in multiples of 1. What I want this texture to do is tile properly so that, say, if a rectangle is 3 units long but 2 high, on that face the texture tiles 3 across and 2 up while remaining square and just looping. But if another side of the shape is, say, 4x5, the texture on that face should be tiles 4 times across and 5 times down. (I hope that makes sense.)

Is there a way to do this in the Unity editor, preferably allowing me to use the same material for all shapes that need the same texture?

Well, with cubes you’ll probably end up with tiling several building blocks of different sizes in a 3D modelling application (3D Max, Maya, Blender), which you can then combine in the game. In certain situations you could also use Tiled Sprites that can tile planes automatically and you can combine them into cube-like geometry. Depends on what you need exactly. See Unity Asset Store - The Best Assets for Game Making