thanks but how can I change the offset of the front side of the skybox? I’ve tried something like this but it didn’t work:
(GetComponent (Skybox) as Skybox).material.SetTextureOffset("Front",
(GetComponent (Skybox) as Skybox).material.GetTextureOffset("Front") +
Vector2(1,0));
Anyway, the name of the texture property for the front image is actually “Front (+Z)”. You can get the source file for the skybox and all the built-in shaders from here.
Now I can access to the texture-offets. I used the following code after I found out that the texture I’m seeing the _DownTex is:
(GetComponent (Skybox) as Skybox).material.SetTextureOffset("_DownTex",
(GetComponent (Skybox) as Skybox).material.GetTextureOffset("_DownTex") +
Vector2(0,1));
But I can’t see my background moving…
Ok the Texture I’m using is really big (over 2000x1700px) but also when I’m trying to manipulate the value manually my background get streched and don’t move
The texture offset is supplied as UV values, not pixels. If you apply an offset of one, you will slide the texture back round to where it was to begin with. Try using 0.01 or even a smaller value to shift the texture.