I made a simple day counter and it doesn’t count up in unity, yet it doesn’t give me an error. I assume it has something to do with my usage of Time.deltaTime
using UnityEngine;
using System.Collections;
public class DaySystem : MonoBehaviour {
public int day = 1;
private float timeOfDay = 0.0f;
public void Start()
{
timeOfDay = Time.deltaTime;
day = 1;
}
private void TimeOfDay()
{
if(Time.deltaTime > 1.0f)
{
timeOfDay += 1.0f;
}
}
public void DayCounter()
{
if (timeOfDay == 25.0f)
{
day += 1;
}
}
}