29 lines
564 B
C#
Raw Normal View History

2025-09-06 17:17:39 +04:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Smoke : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
StartCoroutine(changeSmokeColor());
}
// Update is called once per frame
void Update()
{
}
IEnumerator changeSmokeColor()
{
while (true)
{
var main = GetComponent<ParticleSystem>().main;
main.startColor = RenderSettings.fogColor;
yield return new WaitForSeconds(2.0f);
}
}
}