void OnApplicationQuit() { if (SystemInfo.operatingSystemFamily == OperatingSystemFamily.Windows) { DirectInputWrapper.Close(); } }
void OnDestroy() { //destroy if single one, otherwise transfer control if (inited == this) { inited = null; var other = FindObjectOfType <SteeringWheelInputController>(); if (other != null) { other.Init(); } else { if (SystemInfo.operatingSystemFamily == OperatingSystemFamily.Windows) { DirectInputWrapper.Close(); } } } }
void OnDestroy() { DirectInputWrapper.Close(); }