cleanup
This commit is contained in:
parent
ea71d3b2be
commit
72295561c7
|
@ -6,12 +6,11 @@
|
|||
//
|
||||
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <UnityUtils.h>
|
||||
|
||||
@interface FlutterUnityWidgetPlugin : NSObject<FlutterPlugin>
|
||||
@end
|
||||
|
||||
@interface FUController : NSObject <FlutterPlatformView, UnityEventListener>
|
||||
@interface FUController : NSObject <FlutterPlatformView>
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
viewIdentifier:(int64_t)viewId
|
||||
|
@ -19,7 +18,6 @@
|
|||
registrar:(NSObject<FlutterPluginRegistrar> *)registrar;
|
||||
|
||||
- (UIView*)view;
|
||||
- (void)onMessage:(NSString *)message;
|
||||
@end
|
||||
|
||||
@interface FUViewFactory : NSObject <FlutterPlatformViewFactory>
|
||||
|
|
|
@ -67,10 +67,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)onMessage:(NSString *)message {
|
||||
[_channel invokeMethod:@"onUnityMessage" arguments:message];
|
||||
}
|
||||
|
||||
- (void)onMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
|
||||
if ([[call method] isEqualToString:@"postMessage"]) {
|
||||
[self postMessage:call result:result];
|
||||
|
|
|
@ -23,11 +23,6 @@ extern "C" {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
@protocol UnityEventListener <NSObject>
|
||||
- (void)onMessage:(NSString *)message;
|
||||
@end
|
||||
|
||||
@interface UnityUtils : NSObject
|
||||
|
||||
+ (BOOL)isUnityReady;
|
||||
|
|
|
@ -153,7 +153,7 @@ static BOOL _isUnityReady = NO;
|
|||
UnityAppController *controller = GetAppController();
|
||||
[controller application:application didFinishLaunchingWithOptions:nil];
|
||||
[controller applicationDidBecomeActive:application];
|
||||
|
||||
|
||||
[UnityUtils listenAppState];
|
||||
});
|
||||
}
|
||||
|
|
Reference in New Issue