Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
W
wdlc_mjb_unity
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
wdlc_mjb_unity
Commits
7b4e5b26
Commit
7b4e5b26
authored
Jul 02, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
f9fee9a4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
184 deletions
+50
-184
CrazyCar.unity
Assets/Game/Main/Scenes/CrazyCar.unity
+8
-8
TaskItem.cs
Assets/Game/Main/Scripts/Item/TaskItem.cs
+2
-2
AdUtils.cs
Assets/Game/Main/Scripts/Utils/AdUtils.cs
+5
-0
Guide.cs
Assets/Game/Main/Scripts/Utils/Guide.cs
+5
-1
CustomUnityAppController.mm
Assets/Plugins/iOS/CustomUnityAppController.mm
+0
-102
CustomUnityAppController.mm.meta
Assets/Plugins/iOS/CustomUnityAppController.mm.meta
+0
-33
ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+30
-38
No files found.
Assets/Game/Main/Scenes/CrazyCar.unity
View file @
7b4e5b26
...
@@ -47621,7 +47621,7 @@ RectTransform:
...
@@ -47621,7 +47621,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x:
55, y: -236
}
m_AnchoredPosition: {x:
335, y: -580
}
m_SizeDelta: {x: 97, y: 100}
m_SizeDelta: {x: 97, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1443660352
--- !u!114 &1443660352
...
@@ -47638,7 +47638,7 @@ MonoBehaviour:
...
@@ -47638,7 +47638,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget:
1
m_RaycastTarget:
0
m_Maskable: 1
m_Maskable: 1
m_OnCullStateChanged:
m_OnCullStateChanged:
m_PersistentCalls:
m_PersistentCalls:
...
@@ -56969,7 +56969,7 @@ RectTransform:
...
@@ -56969,7 +56969,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -
80, y: -220
}
m_AnchoredPosition: {x: -
285, y: -577
}
m_SizeDelta: {x: 100, y: 100}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1725500823
--- !u!114 &1725500823
...
@@ -56986,7 +56986,7 @@ MonoBehaviour:
...
@@ -56986,7 +56986,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget:
1
m_RaycastTarget:
0
m_Maskable: 1
m_Maskable: 1
m_OnCullStateChanged:
m_OnCullStateChanged:
m_PersistentCalls:
m_PersistentCalls:
...
@@ -66437,8 +66437,8 @@ RectTransform:
...
@@ -66437,8 +66437,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -
28, y: 525.3
}
m_AnchoredPosition: {x: -
42.9, y: 558.8
}
m_SizeDelta: {x:
154, y: 138
}
m_SizeDelta: {x:
97, y: 100
}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!95 &2035028204
--- !u!95 &2035028204
Animator:
Animator:
...
@@ -68603,7 +68603,7 @@ RectTransform:
...
@@ -68603,7 +68603,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -2
32, y: 426
}
m_AnchoredPosition: {x: -2
89, y: 250
}
m_SizeDelta: {x: 97, y: 100}
m_SizeDelta: {x: 97, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2098422175
--- !u!114 &2098422175
...
@@ -68620,7 +68620,7 @@ MonoBehaviour:
...
@@ -68620,7 +68620,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget:
1
m_RaycastTarget:
0
m_Maskable: 1
m_Maskable: 1
m_OnCullStateChanged:
m_OnCullStateChanged:
m_PersistentCalls:
m_PersistentCalls:
Assets/Game/Main/Scripts/Item/TaskItem.cs
View file @
7b4e5b26
...
@@ -193,8 +193,8 @@ public class TaskItem : MonoBehaviour
...
@@ -193,8 +193,8 @@ public class TaskItem : MonoBehaviour
{
{
if
(
cb
)
if
(
cb
)
{
{
// 看视频后刷新任务数据的接口在AdUtils中report接口调完再调用
EventCenter
.
Broadcast
(
MyEventType
.
UPDATE_HARVEST_DATA
,
1
);
//
EventCenter.Broadcast(MyEventType.UPDATE_HARVEST_DATA, 1);
}
}
else
else
{
{
...
...
Assets/Game/Main/Scripts/Utils/AdUtils.cs
View file @
7b4e5b26
...
@@ -323,6 +323,11 @@ public class AdUtils
...
@@ -323,6 +323,11 @@ public class AdUtils
HttpTool
.
Instance
.
_Post
(
"app/v3/game/report"
,
parm
,
new
Action
<
ParkingSpace
>((
bean
)
=>
HttpTool
.
Instance
.
_Post
(
"app/v3/game/report"
,
parm
,
new
Action
<
ParkingSpace
>((
bean
)
=>
{
{
EventCenter
.
Broadcast
(
MyEventType
.
RefreshHomeInfo
);
EventCenter
.
Broadcast
(
MyEventType
.
RefreshHomeInfo
);
if
(
slot
==
"task_video"
)
{
EventCenter
.
Broadcast
(
MyEventType
.
UPDATE_HARVEST_DATA
,
1
);
}
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
{
Debug
.
unityLogger
.
Log
(
"看视频上报请求Error Code"
+
code
+
"msg"
+
errMsg
);
Debug
.
unityLogger
.
Log
(
"看视频上报请求Error Code"
+
code
+
"msg"
+
errMsg
);
...
...
Assets/Game/Main/Scripts/Utils/Guide.cs
View file @
7b4e5b26
...
@@ -35,9 +35,12 @@ public class Guide : MonoBehaviour
...
@@ -35,9 +35,12 @@ public class Guide : MonoBehaviour
guide
=
this
;
guide
=
this
;
isStartShow
=
false
;
isStartShow
=
false
;
//fitFrame();
#if UNITY_IOS
fitFrame
();
#endif
}
}
#if UNITY_IOS
// 判断是否是刘海屏
// 判断是否是刘海屏
private
static
bool
isX
;
private
static
bool
isX
;
public
static
bool
IsX
public
static
bool
IsX
...
@@ -58,6 +61,7 @@ public class Guide : MonoBehaviour
...
@@ -58,6 +61,7 @@ public class Guide : MonoBehaviour
}
}
}
}
#endif
public
void
showGuide
(
bool
isUser
)
public
void
showGuide
(
bool
isUser
)
{
{
...
...
Assets/Plugins/iOS/CustomUnityAppController.mm
deleted
100644 → 0
View file @
f9fee9a4
#import "UnityAppController.h"
#import "WXApi.h"
#import "BridageManager.h"
#import "UserData.h"
#import "KeychainItemManager.h"
#import "WKWebViewController.h"
@interface CustomUnityAppController : UnityAppController < WXApiDelegate >
@end
IMPL_APP_CONTROLLER_SUBCLASS (CustomUnityAppController)
@implementation CustomUnityAppController
#if defined(__cplusplus)
extern "C" {
#endif
// 显示网页
void ShowIOSWebView(char *urlStr, char *titleStr)
{
// GetAppController()获取appController,相当于self
WKWebViewController *vc = [WKWebViewController new];
vc.url = [NSString stringWithUTF8String:urlStr];
vc.showNav = YES;
vc.webTitle = [NSString stringWithUTF8String:titleStr];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
// 点击按钮后跳转到iOS界面,设置界面为iOS界面
[GetAppController().window.rootViewController presentViewController:nav animated:YES completion:^{
UnityPause(true);
}];
}
// 显示无网络弹窗
void ShowIOSNoWebAlert()
{
UIAlertController *vc = [UIAlertController alertControllerWithTitle:@"无网络连接" message:@"请检查网络环境,并确认开启网络访问权限!" preferredStyle: UIAlertControllerStyleAlert];
UIAlertAction *alert = [UIAlertAction actionWithTitle:@"检查网络" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
}];
[vc addAction:alert];
// UIWindow *window = [UIApplication sharedApplication].keyWindow;
[GetAppController().window.rootViewController presentViewController:vc animated:YES completion:nil];
}
#if defined(__cplusplus)
}
#endif
-(void)bridageUnity
{
UserData *data = [[UserData alloc] init];
[data initPlist];
[KeychainItemManager readKeychainIDFA];
[[BridageManager shareManager] bridage];
}
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
[super application:application didFinishLaunchingWithOptions:launchOptions];
[self bridageUnity];
NSLog(@"走了1");
return YES;
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
[super application:app openURL:url options:options];
NSLog(@"走了2");
if ([WXApi handleOpenURL:url delegate:[BridageManager shareManager]])
{
return YES;
}
return YES;
}
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
NSLog(@"走了3");
if ([WXApi handleOpenUniversalLink:userActivity delegate:[BridageManager shareManager]])
{
return YES;
}
return YES;
}
@end
Assets/Plugins/iOS/CustomUnityAppController.mm.meta
deleted
100644 → 0
View file @
f9fee9a4
fileFormatVersion: 2
guid: 12e763f1de6c94cb3b95a2517ef41313
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
ProjectSettings/ProjectSettings.asset
View file @
7b4e5b26
...
@@ -41,12 +41,6 @@ PlayerSettings:
...
@@ -41,12 +41,6 @@ PlayerSettings:
height
:
1
height
:
1
m_SplashScreenLogos
:
[]
m_SplashScreenLogos
:
[]
m_VirtualRealitySplashScreen
:
{
fileID
:
0
}
m_VirtualRealitySplashScreen
:
{
fileID
:
0
}
m_ShowUnitySplashAds
:
0
m_AdsAndroidGameId
:
m_AdsIosGameId
:
m_ShowSplashAdsSlogan
:
0
m_SloganImage
:
{
fileID
:
0
}
m_SloganHeight
:
150
m_HolographicTrackingLossScreen
:
{
fileID
:
0
}
m_HolographicTrackingLossScreen
:
{
fileID
:
0
}
defaultScreenWidth
:
1024
defaultScreenWidth
:
1024
defaultScreenHeight
:
768
defaultScreenHeight
:
768
...
@@ -124,7 +118,6 @@ PlayerSettings:
...
@@ -124,7 +118,6 @@ PlayerSettings:
vulkanNumSwapchainBuffers
:
3
vulkanNumSwapchainBuffers
:
3
vulkanEnableSetSRGBWrite
:
0
vulkanEnableSetSRGBWrite
:
0
vulkanEnableLateAcquireNextImage
:
0
vulkanEnableLateAcquireNextImage
:
0
useSecurityBuild
:
0
m_SupportedAspectRatios
:
m_SupportedAspectRatios
:
4:3
:
1
4:3
:
1
5:4
:
1
5:4
:
1
...
@@ -284,36 +277,6 @@ PlayerSettings:
...
@@ -284,36 +277,6 @@ PlayerSettings:
m_BuildTargetPlatformIcons
:
m_BuildTargetPlatformIcons
:
-
m_BuildTarget
:
Android
-
m_BuildTarget
:
Android
m_Icons
:
m_Icons
:
-
m_Textures
:
[]
m_Width
:
432
m_Height
:
432
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
324
m_Height
:
324
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
216
m_Height
:
216
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
162
m_Height
:
162
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
108
m_Height
:
108
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
81
m_Height
:
81
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
[]
m_Width
:
192
m_Width
:
192
m_Height
:
192
m_Height
:
192
...
@@ -374,6 +337,36 @@ PlayerSettings:
...
@@ -374,6 +337,36 @@ PlayerSettings:
m_Height
:
36
m_Height
:
36
m_Kind
:
1
m_Kind
:
1
m_SubKind
:
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
432
m_Height
:
432
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
324
m_Height
:
324
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
216
m_Height
:
216
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
162
m_Height
:
162
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
108
m_Height
:
108
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
m_Width
:
81
m_Height
:
81
m_Kind
:
2
m_SubKind
:
-
m_BuildTarget
:
iPhone
-
m_BuildTarget
:
iPhone
m_Icons
:
m_Icons
:
-
m_Textures
:
[]
-
m_Textures
:
[]
...
@@ -472,7 +465,6 @@ PlayerSettings:
...
@@ -472,7 +465,6 @@ PlayerSettings:
m_Kind
:
4
m_Kind
:
4
m_SubKind
:
App Store
m_SubKind
:
App Store
m_BuildTargetBatching
:
[]
m_BuildTargetBatching
:
[]
m_BuildTargetEncrypting
:
[]
m_BuildTargetGraphicsJobs
:
m_BuildTargetGraphicsJobs
:
-
m_BuildTarget
:
MacStandaloneSupport
-
m_BuildTarget
:
MacStandaloneSupport
m_GraphicsJobs
:
0
m_GraphicsJobs
:
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment