Last active
December 19, 2021 05:55
-
-
Save superbderrick/4358db1feaa24e4104fda197c5714c45 to your computer and use it in GitHub Desktop.
This file contains 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
// [!] important set UnityFramework in Target Membership for this file | |
// [!] and set Public header visibility | |
#import <Foundation/Foundation.h> | |
// NativeCallsProtocol defines protocol with methods you want to be called from managed | |
@protocol NativeCallsProtocol | |
@required | |
- (void) loadedUnity:(NSString*)status; | |
// other methods | |
@end | |
__attribute__ ((visibility("default"))) | |
@interface FrameworkLibAPI : NSObject | |
// call it any time after UnityFrameworkLoad to set object implementing NativeCallsProtocol methods | |
+(void) registerAPIforNativeCalls:(id<NativeCallsProtocol>) aApi; | |
@end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment