This repository has been archived on 2020-08-22. You can view files and clone it, but cannot push or open issues or pull requests.
flutter-unity-view-widget/ios/Classes/UnityUtils.h

39 lines
636 B
C
Raw Normal View History

2019-03-26 17:06:17 -04:00
#import <Foundation/Foundation.h>
#ifndef UnityUtils_h
#define UnityUtils_h
2019-03-26 17:06:17 -04:00
#ifdef __cplusplus
extern "C" {
#endif
void InitArgs(int argc, char* argv[]);
2019-03-26 17:06:17 -04:00
bool UnityIsInited(void);
2019-03-26 17:06:17 -04:00
void InitUnity();
2019-03-26 17:06:17 -04:00
void UnityPostMessage(NSString* gameObject, NSString* methodName, NSString* message);
2019-03-26 17:06:17 -04:00
void UnityPauseCommand();
2019-03-26 17:06:17 -04:00
void UnityResumeCommand();
2019-03-26 17:06:17 -04:00
#ifdef __cplusplus
} // extern "C"
#endif
2019-10-17 17:12:13 -04:00
2019-03-26 17:06:17 -04:00
@protocol UnityEventListener <NSObject>
- (void)onMessage:(NSString *)message;
@end
@interface UnityUtils : NSObject
+ (BOOL)isUnityReady;
+ (void)createPlayer:(void (^)(void))completed;
@end
#endif /* UnityUtils_h */