修改天空盒颜色的例子(C#): using UnityEngine; using System.Collections;
public class example : MonoBehaviour { public Color colorStart = Color.blue; public Color colorEnd = Color.green; public float duration = 1.0F; void Update() { float lerp = Mathf.PingPong(Time.time, duration) / duration; RenderSettings.skybox.SetColor("_Tint", Color.Lerp(colorStart, colorEnd, lerp)); } }
修改天空盒颜色的例子(C#):
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Color colorStart = Color.blue;
public Color colorEnd = Color.green;
public float duration = 1.0F;
void Update() {
float lerp = Mathf.PingPong(Time.time, duration) / duration;
RenderSettings.skybox.SetColor("_Tint", Color.Lerp(colorStart, colorEnd, lerp));
}
}
一周热门 更多>