Detecting device orientation change on iOS

How to detect when a device (iPhone or iPad) changes orientation? shows various overridable functions such as OnMouseEnter. It’d be great if there is something like OnDeviceChange().

Thanks in advance for your help.

There’s Input.deviceOrientation

Consider this forum post …


Scroll down to Doug.McFarlane

DeviceChange.OnOrientationChange += MyOrientationChangeCode;
void MyOrientationChangeCode(DeviceOrientation orientation) {}