Мне нужна помощь. Я использую единство и пытаюсь изменить яркость экрана с течением времени, но, похоже, ничего не работает. Я пытаюсь получить легкую составляющую своей игры и отрегулировать ее интенсивность.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class lightning : MonoBehaviour
{
//This is lightning
Light lit;
// Start is called before the first frame update
void Start()
{
lit = GetComponent<Light>();
}
// Update is called once per frame
void Update()
{
lit.color -= (Color.white / 8.0f) * Time.deltaTime;
}
}