void OnDestroy() { if (self == this) { self = null; } }
void Awake() { if (self != null) { if (self != this) { Debug.LogError("multiple events object"); } } self = this; StopAllCoroutines(); StartCoroutine(RefreshOrientationData()); }