The frame size not only varies with wheel size, but also with manufacturer and type of bike. So, you need to know the frame size you need for the particular model of bike you're going to ride.
So, if you ride a 20" 29er with brand A, theres a non-trivial chance that brand B's 29er will be too big or small for you. And theres a good chance that if you ride a 20" 29er, a 20" 26er will be too small for you. If you have a regular old road bike which is a 58 cm, for example, you may find a 58 cm cyclocross bike too big for you. Examples go on and on.
The only way you can be sure of if a bike will fit you is to try it. The second best thing to do is look at the geometry chart (such as this one for the Trek Madone):
and see if the measurements are appropriate for you, for a given size. The two most important ones are typically (effective) top tube length and standover height.