Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sdk-public
unity_sdk_demo
Commits
c9d906bb
Commit
c9d906bb
authored
Oct 17, 2025
by
gaorui
Browse files
feat(app): 更新配置
parent
6a3a7f31
Changes
6
Hide whitespace changes
Inline
Side-by-side
Assets/Plugins/Android/LauncherManifest.xml
View file @
c9d906bb
...
...
@@ -5,11 +5,6 @@
android:normalScreens=
"true"
android:smallScreens=
"true"
android:xlargeScreens=
"true"
/>
<meta-data
android:name=
"android.max_aspect"
android:value=
"2.5"
android:allowBackup=
"false"
android:requestLegacyExternalStorage=
"true"
/>
<queries>
<intent>
...
...
@@ -32,18 +27,23 @@
<application
android:name=
"com.unity.game.Application"
android:theme=
"@style/UnityThemeSelector"
android:icon=
"@mipmap/app_icon"
android:label=
"@string/app_name"
android:allowBackup=
"false"
android:extractNativeLibs=
"true"
android:resizeableActivity=
"false"
android:supportsRtl=
"true"
android:requestLegacyExternalStorage=
"true"
android:usesCleartextTraffic=
"true"
>
<activity
android:name=
"com.unity.game.GameActivity"
android:configChanges=
"mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density"
android:exported=
"true"
android:hardwareAccelerated=
"false"
android:launchMode=
"singleTask"
android:theme=
"@style/UnityThemeSelector"
>
android:exported=
"true"
android:hardwareAccelerated=
"true"
android:resizeableActivity=
"false"
android:screenOrientation=
"sensorLandscape"
android:launchMode=
"singleTask"
>
<intent-filter>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -61,6 +61,10 @@
android:name=
"notch_support"
android:value=
"true"
/>
</activity>
<meta-data
android:name=
"android.max_aspect"
android:value=
"2.4"
/>
<!-- 该标签必须加 -->
<meta-data
android:name=
"MAIN_ACTIVITY"
...
...
Assets/Plugins/Android/libs/launcher-release.aar
View file @
c9d906bb
No preview for this file type
Assets/Scripts/demo/ui/GameSdkManager.cs
View file @
c9d906bb
...
...
@@ -13,6 +13,16 @@ public class GameManager : MonoBehaviour
}
//Android 需监听返回事件,如果当前场景没有返回拦截了需调用 SDK 的退出接口
void
Update
()
{
if
(
Input
.
GetKey
(
KeyCode
.
Escape
))
{
NativeLogger
.
I
(
"Game_Unity_Log"
,
"clicked Exit"
);
HoolaiSdkManager
.
ExitGame
();
}
}
public
void
OnLoginBtnClicked
()
{
NativeLogger
.
I
(
"Game_Unity_Log"
,
"clicked login"
);
...
...
@@ -196,4 +206,5 @@ public class GameManager : MonoBehaviour
NativeLogger
.
I
(
"Game_Unity_Log"
,
"clicked openAccount"
);
HoolaiSdkManager
.
OpenAccountCenter
();
}
}
Packages/manifest.json
View file @
c9d906bb
...
...
@@ -11,7 +11,6 @@
"com.unity.ide.visualstudio"
:
"2.0.22"
,
"com.unity.ide.vscode"
:
"1.2.5"
,
"com.unity.nuget.newtonsoft-json"
:
"3.2.1"
,
"com.unity.purchasing"
:
"4.12.2"
,
"com.unity.test-framework"
:
"1.1.33"
,
"com.unity.textmeshpro"
:
"3.0.7"
,
"com.unity.timeline"
:
"1.7.7"
,
...
...
Packages/packages-lock.json
View file @
c9d906bb
...
...
@@ -117,19 +117,6 @@
"dependencies"
:
{},
"url"
:
"https://packages.unity.cn"
},
"com.unity.purchasing"
:
{
"version"
:
"4.12.2"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{
"com.unity.ugui"
:
"1.0.0"
,
"com.unity.modules.unitywebrequest"
:
"1.0.0"
,
"com.unity.modules.jsonserialize"
:
"1.0.0"
,
"com.unity.modules.androidjni"
:
"1.0.0"
,
"com.unity.services.core"
:
"1.12.5"
},
"url"
:
"https://packages.unity.cn"
},
"com.unity.services.analytics"
:
{
"version"
:
"6.0.3"
,
"depth"
:
1
,
...
...
@@ -143,7 +130,7 @@
},
"com.unity.services.core"
:
{
"version"
:
"1.14.0"
,
"depth"
:
1
,
"depth"
:
2
,
"source"
:
"registry"
,
"dependencies"
:
{
"com.unity.modules.androidjni"
:
"1.0.0"
,
...
...
ProjectSettings/ProjectSettings.asset
View file @
c9d906bb
...
...
@@ -419,62 +419,74 @@ PlayerSettings:
m_Height
:
81
m_Kind
:
2
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
192
m_Height
:
192
m_Kind
:
1
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
144
m_Height
:
144
m_Kind
:
1
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
96
m_Height
:
96
m_Kind
:
1
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
72
m_Height
:
72
m_Kind
:
1
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
48
m_Height
:
48
m_Kind
:
1
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
36
m_Height
:
36
m_Kind
:
1
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
192
m_Height
:
192
m_Kind
:
0
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
144
m_Height
:
144
m_Kind
:
0
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
96
m_Height
:
96
m_Kind
:
0
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
72
m_Height
:
72
m_Kind
:
0
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
48
m_Height
:
48
m_Kind
:
0
m_SubKind
:
-
m_Textures
:
[]
-
m_Textures
:
-
{
fileID
:
0
}
m_Width
:
36
m_Height
:
36
m_Kind
:
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