Beispiel #1
0
    private IEnumerator ChangeSkybox(Texture texture, System.Object userData)
    {
        _isFading       = true;
        _fader.fadeTime = fadeTime;
        yield return(_fader.Fade(0, 1));

        RenderSettings.skybox.mainTexture = texture;
        if (userData != null)
        {
            EventBus.Instance.Raise(new NavigationEvent(NavEventType.SkyboxChanged, userData));
        }
        yield return(_fader.Fade(1, 0));

        _fader.fadeTime = _originalFadeTime;
        _isFading       = false;
    }