-
Notifications
You must be signed in to change notification settings - Fork 15
2. Start here!
Batchhh edited this page Oct 19, 2024
·
1 revision
Config.h file:
#define BINARY_NAME "UnityFramework"
#define WAIT_TIME_SEC 60Tweak.xm file:
#include "IOS-Il2cppResolver/IL2CPP_Resolver.hpp"
static inline const char* IL2CPP_FRAMEWORK(const char* NAME) {
NSString *appPath = [[NSBundle mainBundle] bundlePath];
NSString *binaryPath = [NSString stringWithFormat:@"%s", NAME];
if ([binaryPath isEqualToString:@"UnityFramework"])
{
binaryPath = [appPath stringByAppendingPathComponent:@"Frameworks/UnityFramework.framework/UnityFramework"];
}
else
{
binaryPath = [appPath stringByAppendingPathComponent:binaryPath];
}
return [binaryPath UTF8String];
}
void init() {
IL2CPP::Initialize(true, WAIT_TIME_SEC, IL2CPP_FRAMEWORK(BINARY_NAME)
}