How can I tile a texture on a Skybox?

My goal is to have a regular grid displayed on the skybox. The box is stationary and the camera can rotate around inside it, but instead of being seamless sky it actually looks like a box due to the grid.

I've created a texture that I want to tile across each face of the box, but the tiling settings for the material do not work when I choose the RenderFX/Skybox shader.

Tiling does work with the default Diffuse shader, however when this material used as a Skybox only the front and back faces of the box are rendered (since its not actually a skybox material).

Any suggestions? I'm using Unity 3.3.

If I'm going to have to write my own shader anyway, would it be better to do without the texture entirely and define the grid programatically?

A skybox texture more or less is always projected at the same distance from your character. That way when you move, it looks infinitely far away, like a real sky.

Knowing this, you could cheat and fake the effect, since we also know you can't really tile the texture on a skybox (each of the skybox cubemap textures makes a side).

What I would do is make the tiling texture I wanted, then create a plane and a camera in Unity. Rotate the plane so it faces the camera object. Put the plane on it's own layer, and set the camera you made to only render the layer the plane is on. Scale the plane so it fills the viewport, and make the plane child to the camera that renders it.

Now make that whole assembly a child of the Main Camera. Set the Main camera to render everything BUT the plane layer.

Apply texture to plane, tile as needed.

Now, when you move, the plane will appear to remain stationary while the player and environment will move accordingly. Your plane will always appear to be equidistant from the camera, and you will overcome some skybox limitations. Use multiple planes with some scripting and you can do stuff like fake 2D parallax scrolling effects too!

Sent you an example to support@unity3d.com