So I am working on creating an Input/Device event system and I am trying to check the device’s orientation through an event.
I can check the device orientation by using
if (Input.deviceOrientation == DeviceOrientation.Portrait)
in the update loop
However this causes all methods subscribed to the event to be called per frame and that is something I do not want to do. Is there a “cleaner” way to check if the device’s orientation has changed without using the update loop?