- Home /
Skybox Transition
Hi there,
I am trying to make a transition between two sky's and no tutorial or script I can find seems to work. Could someone spell out for me how to achieve this? I am quite new sorry. Also say if the script is in C# or JS and where you placed it. I will be looking to make the sky transition start once the player collides with an object.
Many thanks
Matthew
Answer by Wolfram · May 23, 2012 at 09:54 PM
The idea of Unity Answers is not to ask for scripts and get them delivered. Generally, people will simply give you pointers and encourage you to find or create your own solution.
However, the script to blend between two skyboxes already exists, and it took me approximately 17 seconds to google it up. Apparently it had some problems with Unity 3.x, but there is already a fix for that: http://forum.unity3d.com/threads/60990-solved-Skybox-blend-broken-in-Unity-3
If that still doesn't work, I'll have to check the version of it which we are using, but I can only do that tomorrow. It definitely works with 3.5.
Great thanks Wolfram, duly noted.
I am unable to download the example file on that site and when I copy the script in I get A LOT of errors in unity? Im using version 3.5.1f2.
This is what I meant by not being able to find something that works, or works with my knowledge. You dont know a recent tutorial that covers all the basics?
Thanks
Hm, I cannot reproduce this, the Shader in the Wiki works exactly as it should. We're using the exact same version, except we have an additional "ZWrite On" in there, but that should be irrelevant in the general case.
Just right-click in your Project tab, select "Create->Shader", edit it, and copy everything in the "ShaderLab - SkyboxBlended.shader" section of http://www.unifycommunity.com/wiki/index.php?title=SkyboxBlended into that.
$$anonymous$$aybe you created a C#/JS-Script for that? You need a Shader, this is not a script.
@Wolfram $$anonymous$$resse Thanks for that! I didn't actually realise that it was a shader file....It's in my project panel fine now.
Do you know any tutorials to show me how to use this? Or for the method behind it? I tried googling it but my knowledge is too small to find anything useful.
Thanks a lot!!
Your answer
Follow this Question
Related Questions
Day/Night cycle transition help? 2 Answers
Unity skybox isn't showing true colors,Skybox colors are not true colors 0 Answers
Detail meshes renderices black when they hit the skybox on vr 0 Answers
Transition Free Fall into Sinus Hovering 3 Answers
Animator bug when activating a transition condition using SetBool 0 Answers