I was thinking of making a singular NotificationHandler.cs that would handle both iOS and Android notifications.
My reasonings are:
- Only the new NotificationHandler.cs will have the #if UNITY_ANDROID/IOS preprocessor directives, and no other script will need to have them, including the MainMenu.cs file.
- We can write a single ScheduleNotification() function that can be called anywhere without manually filtering device type.
The downside is having a long ScheduleNotification() function with both the Android and iOS versions of the function, but they can also be broken down into two separate private functions. I’m not sure how this would affect performance, but I would assume it would make working in a team easier, since others wouldn’t have to guess how to use the two different classes.