Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit b9cd5f3

Browse files
committed
merge
2 parents a0018ee + 1f3ff7e commit b9cd5f3

34 files changed

+553
-697
lines changed

README-ZH.md

Lines changed: 90 additions & 155 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 93 additions & 177 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:72847247f38689069b9c876ac18ea4ea2f2b982e9c5b5517aa3da45bdf822b25
3+
size 76051376

com.unity.uiwidgets/Runtime/Plugins/Android/libUIWidgets_d.so.meta renamed to com.unity.uiwidgets/Runtime/Plugins/Android/libUIWidgets.so.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

com.unity.uiwidgets/Runtime/Plugins/Android/libUIWidgets_d.so

Lines changed: 0 additions & 3 deletions
This file was deleted.

com.unity.uiwidgets/Runtime/Plugins/ios/CustomAppController.m

Lines changed: 0 additions & 26 deletions
This file was deleted.

com.unity.uiwidgets/Runtime/Plugins/ios/CustomAppController.m.meta

Lines changed: 0 additions & 78 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef CUSTOM_APP_CONTROLLER_H
2+
#define CUSTOM_APP_CONTROLLER_H
3+
4+
#import "UnityAppController.h"
5+
6+
@interface CustomUIWidgetsAppController : UnityAppController
7+
{
8+
}
9+
- (void)shouldAttachRenderDelegate;
10+
@end
11+
12+
#endif

engine/src/external/ios/CustomAppController.m renamed to com.unity.uiwidgets/Runtime/Plugins/ios/custom_app_controller.m

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,20 @@
22

33
#import "UnityAppController.h"
44
#import <TargetConditionals.h>
5+
#import "custom_app_controller.h"
56

67
extern void UnityPluginLoad(struct IUnityInterfaces *interfaces);
78
extern void UnityPluginUnload(void);
89

910
#pragma mark - App controller subclasssing
1011

11-
@interface CustomAppController : UnityAppController
12-
{
13-
}
14-
- (void)shouldAttachRenderDelegate;
15-
@end
16-
17-
@implementation CustomAppController
12+
@implementation CustomUIWidgetsAppController
1813
- (void)shouldAttachRenderDelegate;
1914
{
2015
UnityRegisterRenderingPluginV5(&UnityPluginLoad, &UnityPluginUnload);
2116
}
2217
@end
2318

24-
IMPL_APP_CONTROLLER_SUBCLASS(CustomAppController);
19+
IMPL_APP_CONTROLLER_SUBCLASS(CustomUIWidgetsAppController);
2520

2621
#endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#import <UIKit/UIKit.h>
2+
#import "uiwidgets_device.h"
3+
4+
extern "C"
5+
{
6+
float IOSDeviceScaleFactor()
7+
{
8+
float scale = [[UIScreen mainScreen] scale] * 1.0;
9+
if ([UIWidgetsDevice NeedScreenDownSample]) {
10+
scale *= 0.8696;
11+
}
12+
return scale;
13+
}
14+
}

0 commit comments

Comments
 (0)