源战役客户端
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

36 linhas
700 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteInEditMode]
public class CustomFog : MonoBehaviour
{
public float FogHeightStart = 0;
public float FogHeightEnd = 30;
public Color FogColor = Color.white;
void Awake()
{
UpdateFog();
}
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void UpdateFog()
{
if (FogHeightStart > (FogHeightEnd - 1))
FogHeightStart = FogHeightEnd - 1;
Shader.SetGlobalFloat("_GlobalFogHeightStart", FogHeightStart);
Shader.SetGlobalFloat("_GlobalFogHeightEnd", FogHeightEnd);
}
}