Created
June 14, 2020 14:28
-
-
Save troy-lamerton/71409dcdbd5025946ebdf5ff5e84e0f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// unity 2019.3 | |
#import <UIKit/UIKit.h> | |
#import "UnityAppController.h" | |
#import <Commons/Commons-Swift.h> | |
#import "UnityInterface.h" | |
@interface MainAppController : UnityAppController<UIApplicationDelegate> | |
@end | |
@implementation MainAppController | |
- (void)preStartUnity { | |
[super preStartUnity]; | |
// must set this first, lots of other swift code depends on UnitySendMessage | |
[UnityInterfaceSw setUnitySendMessage: (^(const char * _Nonnull g, const char * _Nonnull m, const char * _Nonnull a) { | |
UnitySendMessage(g, m, a); | |
})]; | |
} | |
@end | |
IMPL_APP_CONTROLLER_SUBCLASS(MainAppController) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment