Commit 45d5d79e cgx

优化unity 40分钟退到首页后不断执行关闭方法bug

1 个父辈 fa99d337
......@@ -81,8 +81,6 @@
D07A4B2D280EA73B00BA0EC0 /* UserInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = D07A4B2C280EA73B00BA0EC0 /* UserInfoView.m */; };
D07A657D28158A1900C15AF6 /* DsWebController.m in Sources */ = {isa = PBXBuildFile; fileRef = D07A657C28158A1900C15AF6 /* DsWebController.m */; };
D07A65832815911D00C15AF6 /* DsMaskView.m in Sources */ = {isa = PBXBuildFile; fileRef = D07A65822815911D00C15AF6 /* DsMaskView.m */; };
D07C432C285AE07700A6676D /* UnityFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0FFCD402853421900A01707 /* UnityFramework.framework */; };
D07C432D285AE07700A6676D /* UnityFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D0FFCD402853421900A01707 /* UnityFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D07DAC902810546A0067A1BF /* DSImagePickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = D07DAC8F2810546A0067A1BF /* DSImagePickerController.m */; };
D07DACA42810557D0067A1BF /* CGGeometry+RSKImageCropper.m in Sources */ = {isa = PBXBuildFile; fileRef = D07DAC922810557D0067A1BF /* CGGeometry+RSKImageCropper.m */; };
D07DACA52810557D0067A1BF /* RSKInternalUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = D07DAC932810557D0067A1BF /* RSKInternalUtility.m */; };
......@@ -146,6 +144,8 @@
D0AEFE7C2817D13400230DC6 /* UITableViewCell+CardRadius.m in Sources */ = {isa = PBXBuildFile; fileRef = D0AEFE7A2817D13400230DC6 /* UITableViewCell+CardRadius.m */; };
D0AEFE812817DD1500230DC6 /* MyFeedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D0AEFE7E2817DD1500230DC6 /* MyFeedCell.m */; };
D0AEFE822817DD1500230DC6 /* MyFeedListController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0AEFE802817DD1500230DC6 /* MyFeedListController.m */; };
D0B1124528629C0F00A496FB /* UnityFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0FFCD402853421900A01707 /* UnityFramework.framework */; };
D0B1124628629C0F00A496FB /* UnityFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D0FFCD402853421900A01707 /* UnityFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D0B5ECA627F2D9DE003EDFE3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B5ECA527F2D9DE003EDFE3 /* AppDelegate.m */; };
D0B5ECAF27F2D9DE003EDFE3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D0B5ECAD27F2D9DE003EDFE3 /* Main.storyboard */; };
D0B5ECB127F2D9E0003EDFE3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0B5ECB027F2D9E0003EDFE3 /* Assets.xcassets */; };
......@@ -226,13 +226,13 @@
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
D07C432E285AE07700A6676D /* Embed Frameworks */ = {
D0B1124728629C1000A496FB /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
D07C432D285AE07700A6676D /* UnityFramework.framework in Embed Frameworks */,
D0B1124628629C0F00A496FB /* UnityFramework.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -679,9 +679,9 @@
D0F963CE285C51E100D75CD7 /* libWeChatSDK.a in Frameworks */,
D013CD4528585C7800F920B4 /* UMCommonLog.framework in Frameworks */,
39CC172FB610DA5F29120B56 /* Pods_DreamSleep.framework in Frameworks */,
D07C432C285AE07700A6676D /* UnityFramework.framework in Frameworks */,
D0F963CB285C51E100D75CD7 /* libSocialWeChat.a in Frameworks */,
D0F963CA285C51E100D75CD7 /* UMShare.framework in Frameworks */,
D0B1124528629C0F00A496FB /* UnityFramework.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -1823,7 +1823,7 @@
D0B5EC9E27F2D9DE003EDFE3 /* Frameworks */,
D0B5EC9F27F2D9DE003EDFE3 /* Resources */,
409ED65E54EAA1876017E6E6 /* [CP] Embed Pods Frameworks */,
D07C432E285AE07700A6676D /* Embed Frameworks */,
D0B1124728629C1000A496FB /* Embed Frameworks */,
);
buildRules = (
);
......@@ -2294,9 +2294,9 @@
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.4",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.4/SocialLibraries/QQ/QQSDK",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/umcommonlog/umcommonlog_ios_2.0.0",
"$(PROJECT_DIR)/unity_build_framework",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.5",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.5/SocialLibraries/QQ/QQSDK",
"$(PROJECT_DIR)/unity_build_framework",
);
GCC_PREFIX_HEADER = "${SRCROOT}/DreamSleep/Basement/DSConfig/PrefixHeader.pch";
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
......@@ -2368,9 +2368,9 @@
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.4",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.4/SocialLibraries/QQ/QQSDK",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/umcommonlog/umcommonlog_ios_2.0.0",
"$(PROJECT_DIR)/unity_build_framework",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.5",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.5/SocialLibraries/QQ/QQSDK",
"$(PROJECT_DIR)/unity_build_framework",
);
GCC_PREFIX_HEADER = "${SRCROOT}/DreamSleep/Basement/DSConfig/PrefixHeader.pch";
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
......@@ -2505,9 +2505,9 @@
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.4",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.4/SocialLibraries/QQ/QQSDK",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/umcommonlog/umcommonlog_ios_2.0.0",
"$(PROJECT_DIR)/unity_build_framework",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.5",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSDK/share/share_ios_6.10.5/SocialLibraries/QQ/QQSDK",
"$(PROJECT_DIR)/unity_build_framework",
);
GCC_PREFIX_HEADER = "${SRCROOT}/DreamSleep/Basement/DSConfig/PrefixHeader.pch";
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
......
......@@ -5,9 +5,29 @@
// Created by peter on 2022/4/11.
//
/*
集成Unity工程注意事项:
1、默认情况关闭手机静音按钮,进入Unity游戏后播放音频没有声音,需要到Unity工程-UnityAppController.mm修改源代码;
2、首次启动Unity游戏,默认会加载主APP启动页面,需要到Unity工程-UnityAppController+ViewHandling.mm修改源代码;
3、Unity工程不支持bitcode,需要关闭;
4、Unity工程有变化时需要手动编译生成新的UnityFramework.framework动态库,然后导入到该目录下:
$(PROJECT_DIR)/unity_build_framework(后续通过脚本优化?)
5、Unity加载页面在X系列手机第二次进来无法隐藏状态栏,需要手动调整
*/
#import "UnityGameController.h"
#import <UnityFramework/UnityFramework.h>
#if TARGET_IPHONE_SIMULATOR
@implementation UnityGameController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = DSBlack;
[DSProgressHUD showToast:@"Unity暂不支持模拟器"];
}
@end
#elif TARGET_OS_IPHONE
#import <UnityFramework/UnityFramework.h>
@interface UnityGameController () <UnityFrameworkListener>
@property (nonatomic, strong) UnityFramework* ufw;
@end
......@@ -116,13 +136,6 @@ extern char** gArgv;
[self setUfw: nil];
[DSDelegateWindow makeKeyAndVisible];
}
/*
集成Unity工程注意事项:
1、默认情况关闭手机静音按钮,进入Unity游戏后播放音频没有声音,需要到Unity工程-UnityAppController.mm修改源代码;
2、首次启动Unity游戏,默认会加载主APP启动页面,需要到Unity工程-UnityAppController+ViewHandling.mm修改源代码;
3、Unity工程不支持bitcode,需要关闭;
4、Unity工程有变化时需要手动编译生成新的UnityFramework.framework动态库,然后导入到该目录下:
$(PROJECT_DIR)/unity_build_framework(后续通过脚本优化?)
*/
@end
#endif
......@@ -9843,22 +9843,27 @@ IL_0032:
int32_t L_8 = V_0;
if ((((int32_t)G_B3_0) < ((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_8, (int32_t)((int32_t)10))))))
{
goto IL_003e;
goto IL_0049;
}
}
{
// lastTouchTime = DateTime.Now;
IL2CPP_RUNTIME_CLASS_INIT(DateTime_tEAF2CD16E071DF5441F40822E4CFE880E5245405_il2cpp_TypeInfo_var);
DateTime_tEAF2CD16E071DF5441F40822E4CFE880E5245405 L_9;
L_9 = DateTime_get_Now_mCAC695993D6E2C57B900C83BEF3F8B18BC4EBC2C(/*hidden argument*/NULL);
__this->set_lastTouchTime_5(L_9);
// CloseApp();
TapMain_CloseApp_mFF42BD35DFF1B278FC35A9B0093E6B143706648C(__this, /*hidden argument*/NULL);
}
IL_003e:
IL_0049:
{
// if (isNeedTouch)
IL2CPP_RUNTIME_CLASS_INIT(TapMain_tDCEEC4415B79C4C821EC29F1412F73F4EF613676_il2cpp_TypeInfo_var);
bool L_9 = ((TapMain_tDCEEC4415B79C4C821EC29F1412F73F4EF613676_StaticFields*)il2cpp_codegen_static_fields_for(TapMain_tDCEEC4415B79C4C821EC29F1412F73F4EF613676_il2cpp_TypeInfo_var))->get_isNeedTouch_4();
if (!L_9)
bool L_10 = ((TapMain_tDCEEC4415B79C4C821EC29F1412F73F4EF613676_StaticFields*)il2cpp_codegen_static_fields_for(TapMain_tDCEEC4415B79C4C821EC29F1412F73F4EF613676_il2cpp_TypeInfo_var))->get_isNeedTouch_4();
if (!L_10)
{
goto IL_004c;
goto IL_0057;
}
}
{
......@@ -9868,21 +9873,21 @@ IL_003e:
return;
}
IL_004c:
IL_0057:
{
// else if ( Countdown < 10 && Input.GetMouseButtonDown(0))
int32_t L_10 = __this->get_Countdown_6();
if ((((int32_t)L_10) >= ((int32_t)((int32_t)10))))
int32_t L_11 = __this->get_Countdown_6();
if ((((int32_t)L_11) >= ((int32_t)((int32_t)10))))
{
goto IL_007e;
goto IL_0089;
}
}
{
bool L_11;
L_11 = Input_GetMouseButtonDown_m466D81FDCC87C9CB07557B39DCB435EB691F1EF3(0, /*hidden argument*/NULL);
if (!L_11)
bool L_12;
L_12 = Input_GetMouseButtonDown_m466D81FDCC87C9CB07557B39DCB435EB691F1EF3(0, /*hidden argument*/NULL);
if (!L_12)
{
goto IL_007e;
goto IL_0089;
}
}
{
......@@ -9892,7 +9897,7 @@ IL_004c:
TapMain_ChangeText_mC6A37BECA533D8F976B1C02AE7F26DE91056BA73(__this, _stringLiteral4C2A36BB2C7F8FCA1C3B412105494317BDE6CD91, _stringLiteral5216F205D923970A8EE45A7455AA20856FAEB2D0, /*hidden argument*/NULL);
}
IL_007e:
IL_0089:
{
// }
return;
......
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "Icon-iPhone-120.png",
"idiom" : "iphone",
"scale" : "2x",
......@@ -41,15 +11,13 @@
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"pre-rendered" : false
}
}
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!