I need a script that allows the skybox to change after my first person controller collides with an object.
I’ve tried this javascript
function OnTriggerEnter(other : Collider)
{
if (other.tag == “Player” && RenderSettings.skybox != otherSkybox)
RenderSettings.skybox = otherSkybox;
}
However, I do not know what to put in ‘otherSkybox’, what identifier to put.
Let’s say my skybox is called xxx in the assets folder, how do I apply it in this code?
Or are there any other simple codes that allow collision then skybox change in game?
Many thanks in advance