In C#, can I get a single side of a cube to show the material?

For example, I have a cube with a red material on it. What I want to do is get it to find the longest side of the cube under localScale and grab the positive side that is longer (If localScale.x is greater than z, then show the material on +X).

Now, how can I display that material only on that one side if it’s possible?

No, I don’t want to use UV Mapping either. I want to do this in Unity.

You can build your cubes out of planes, and then set the texture of the correct plane. Another option is to do your uv mapping inside of Unity. That is create a texture map (for you describe, you only need to two rectangles in the map) and then set the uvs in the mesh dynamically. Or you could modify the mesh of the cube and use the materials array to specify the material for each side.

Option #2 is the most efficient in terms of draw calls.