Cleanup, use Time.realTimeSinceStartup instead of Time.time, add some stuff

This commit is contained in:
Sinai
2021-05-03 21:02:01 +10:00
parent ad61ff243a
commit 8d9d8f76c2
22 changed files with 321 additions and 198 deletions

View File

@ -28,7 +28,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
suggestions.Clear();
AutoCompleter.Instance.SetSuggestions(suggestions);
timeOfLastCheck = Time.time;
timeOfLastCheck = Time.realtimeSinceStartup;
InputField.text = suggestion.UnderlyingValue;
}
@ -84,10 +84,10 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
private void OnInputFieldChanged(string value)
{
if (timeOfLastCheck == Time.time)
if (!timeOfLastCheck.OccuredEarlierThanDefault())
return;
timeOfLastCheck = Time.time;
timeOfLastCheck = Time.realtimeSinceStartup;
value = value ?? "";