1using System.Collections;
2using System.Collections.Generic;
12 private bool collectData =
false;
13 readonly List<bool> data =
new List<bool>();
14 private bool isEditor =
false;
18 isEditor = FindObjectOfType<StartStageOnLoad>() !=
null;
20 StartCoroutine(DataCollector());
26 return (
float)data.Count(x => x) / data.Count;
47 IEnumerator DataCollector()
51 while (!collectData || isEditor)
53 yield
return new WaitForSecondsRealtime(0.1f);
55 GestureResult leftResult = GestureProvider.LeftHand;
56 GestureResult rightResult = GestureProvider.RightHand;
57 if (leftResult !=
null || rightResult !=
null)
65 yield
return new WaitForSecondsRealtime(0.5f);
void StopCollecting(bool purge=true)
void StartCollecting(bool clear=true)