源战役客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

36 行
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);
}
}