blended sykbox animation

hi there,

how do i animate a SkyboxBlended (see wiki) using AniMate?

i can set the blend value using

RenderSettings.skybox.SetFloat("_Blend", value);

but how do i animate that strange SetFloat thing using AniMate?

thanks, flexrails

AniMate only works on properties, but SkyboxBlended is a shader, which only allows you to change the _Blend value using the SetFloat method.

What you need to do is wrap SkyboxBlended in a class which exposes a property for AniMate to use.

// C#... sorry i don't know how you would do this in JavaScript
class SkyboxBlendedProxy
{
    public float Blend
    {
        get { return RenderSettings.skybox.GetFloat("_Blend"); }
        set { RenderSettings.skybox.SetFloat("_Blend", value); }
    }
}

Now you can use AniMate on the proxy

var proxy = new SkyboxBlendedProxy();
Ani.Mate.To(proxy, 2, {"Blend": 1.0f});