Is it possible to texture objects like this in unity? (Video inside) [Solved. Wanted screen space texture]

Right, so I have a lot of differently shaped and sized objects with the same texture, and I wan’t them all to match up when they’re next to each other. Since they scale in all 3 dimensions during runtime, I can’t(or at least don’t know how to) scale the texture in different values on different sides of the object.

But then I saw my kid watching this cartoon. Chowder - Chowder Grows Up (Preview) - YouTube Notice how the purple (and later the blue) clothes are “textured”. The clothes move, but the texture always stays in place. Like it has a global position independent of the textured object. If my texture was set up like this, I could place objects anywhere and whatever shape I wanted, they would always match up. So is this possible?

I believe what you want is a shader that does texturing in screen space. There is one that you might be able to modify, in Unity’s surface shader examples here: http://docs.unity3d.com/Documentation/Components/SL-SurfaceShaderExamples.html - search that page for “Detail Texture in Screen Space”.
You’ll want to rewrite this part:

o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
float2 screenUV = IN.screenPos.xy / IN.screenPos.w;
screenUV *= float2(8,6);
o.Albedo *= tex2D (_Detail, screenUV).rgb * 2;

to say

float2 screenUV = IN.screenPos.xy / IN.screenPos.w;
o.Albedo = tex2D (_Detail, screenUV).rgb;

Which makes it use only the Detail texture and ignore the Main texture. If you want to be thorough, remove the lines “_MainTex (“Texture”, 2D) = “white” {}” and “float2 uv_MainTex;” and “sampler2D _MainTex;” as well.