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
73f139e0
Commit
73f139e0
authored
Jan 27, 2026
by
lujie
Browse files
feat(app): add Preserve and link,modify exit
parent
b62406b5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Assets/Plugins/OpenHarmony/SdkPlugin.ets
View file @
73f139e0
...
...
@@ -6,7 +6,7 @@ import { LoginResult } from "fastsdk/src/main/ets/model/LoginResult";
import { PayParams } from "fastsdk/src/main/ets/model/PayParams";
import { PlayerInfo } from "fastsdk/src/main/ets/model/PlayerInfo";
import { DataType } from "core";
import { Tuanjie } from "
./utils/TuanjieNative
";
import { Tuanjie } from "
classesLib
";
class SdkPlugin {
private static instance: SdkPlugin | null = null
...
...
@@ -80,7 +80,7 @@ class SdkPlugin {
},
onExitSuccess: (result: string) => {
LogUtil.info('退出成功:' + result);
this.
c
ontext.terminateSelf();
(
this.
uiContext?.getHostContext() as common.UIAbilityC
ontext
)?
.terminateSelf();
}
};
fastSdk.hlAccountListener = {
...
...
Assets/Plugins/OpenHarmony/assets/fastsdk.har.meta
0 → 100644
View file @
73f139e0
fileFormatVersion: 2
guid: CHtL4S6lVn/0iGGfdQYNnoAPLnIhgBwh7pEhmcus9awFB+OkMcZkSHI=
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:
OpenHarmony: OpenHarmony
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/sdk/channel/HarmonySdkInterface.cs
View file @
73f139e0
using
System
;
using
UnityEngine
;
using
UnityEngine.Scripting
;
[
Preserve
]
public
class
HarmonySdkInterface
{
private
static
OpenHarmonyJSObject
_openHarmonyJSObject
;
...
...
Assets/link.xml
View file @
73f139e0
...
...
@@ -21,6 +21,7 @@
<type
fullname=
"AndroidSdkInterface"
preserve=
"all"
/>
<type
fullname=
"IosSdkInterface"
preserve=
"all"
/>
<type
fullname=
"UnityMainThreadDispatcher"
preserve=
"all"
/>
<type
fullname=
"HarmonySdkInterface"
preserve=
"all"
/>
<!-- util config -->
<type
fullname=
"NativeLogger"
preserve=
"all"
/>
...
...
Packages/packages-lock.json
View file @
73f139e0
...
...
@@ -38,8 +38,8 @@
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{
"com.unity.
ugui
"
:
"1.0.
0
"
,
"com.unity.
services.analytics
"
:
"1.0.
4
"
"com.unity.
services.analytics
"
:
"1.0.
4
"
,
"com.unity.
ugui
"
:
"1.0.
0
"
},
"url"
:
"https://packages.tuanjie.cn"
},
...
...
@@ -207,16 +207,6 @@
},
"url"
:
"https://packages.tuanjie.cn"
},
"com.unity.xr.legacyinputhelpers"
:
{
"version"
:
"2.1.12"
,
"depth"
:
0
,
"source"
:
"registry"
,
"dependencies"
:
{
"com.unity.modules.vr"
:
"1.0.0"
,
"com.unity.modules.xr"
:
"1.0.0"
},
"url"
:
"https://packages.unity.com"
},
"com.unity.modules.ai"
:
{
"version"
:
"1.0.0"
,
"depth"
:
0
,
...
...
UserSettings/Layouts/default-2022.dwlt
View file @
73f139e0
...
...
@@ -19,7 +19,7 @@ MonoBehaviour:
width
:
1920
height
:
1037
m_ShowMode
:
4
m_Title
:
Project
m_Title
:
Scene
m_RootView
:
{
fileID
:
2
}
m_MinSize
:
{
x
:
875
,
y
:
300
}
m_MaxSize
:
{
x
:
10000
,
y
:
10000
}
...
...
@@ -119,7 +119,7 @@ MonoBehaviour:
m_MinSize
:
{
x
:
300
,
y
:
100
}
m_MaxSize
:
{
x
:
24288
,
y
:
16192
}
vertical
:
0
controlID
:
10
4
controlID
:
10
0
draggingID
:
0
---
!u!114
&6
MonoBehaviour
:
...
...
@@ -145,7 +145,7 @@ MonoBehaviour:
m_MinSize
:
{
x
:
200
,
y
:
100
}
m_MaxSize
:
{
x
:
16192
,
y
:
16192
}
vertical
:
1
controlID
:
3
8
controlID
:
3
7
draggingID
:
0
---
!u!114
&7
MonoBehaviour
:
...
...
@@ -167,11 +167,11 @@ MonoBehaviour:
x
:
0
y
:
0
width
:
1250
height
:
606
height
:
528
m_MinSize
:
{
x
:
200
,
y
:
50
}
m_MaxSize
:
{
x
:
16192
,
y
:
8096
}
vertical
:
0
controlID
:
3
9
controlID
:
3
8
draggingID
:
0
---
!u!114
&8
MonoBehaviour
:
...
...
@@ -191,7 +191,7 @@ MonoBehaviour:
x
:
0
y
:
0
width
:
323
height
:
606
height
:
528
m_MinSize
:
{
x
:
201
,
y
:
221
}
m_MaxSize
:
{
x
:
4001
,
y
:
4021
}
m_ActualView
:
{
fileID
:
13
}
...
...
@@ -217,7 +217,7 @@ MonoBehaviour:
x
:
323
y
:
0
width
:
927
height
:
606
height
:
528
m_MinSize
:
{
x
:
202
,
y
:
221
}
m_MaxSize
:
{
x
:
4002
,
y
:
4021
}
m_ActualView
:
{
fileID
:
14
}
...
...
@@ -242,9 +242,9 @@ MonoBehaviour:
m_Position
:
serializedVersion
:
2
x
:
0
y
:
606
y
:
528
width
:
1250
height
:
381
height
:
459
m_MinSize
:
{
x
:
231
,
y
:
271
}
m_MaxSize
:
{
x
:
10001
,
y
:
10021
}
m_ActualView
:
{
fileID
:
15
}
...
...
@@ -369,7 +369,7 @@ MonoBehaviour:
x
:
2560
y
:
73
width
:
322
height
:
5
85
height
:
5
07
m_SerializedDataModeController
:
m_DataMode
:
0
m_PreferredDataMode
:
0
...
...
@@ -385,7 +385,7 @@ MonoBehaviour:
scrollPos
:
{
x
:
0
,
y
:
0
}
m_SelectedIDs
:
m_LastClickedID
:
0
m_ExpandedIDs
:
92f
6ffff
def6
ffff
ba
f8ffff
ca
faffff
m_ExpandedIDs
:
baf3ffff0
6f
4
fff
fe2f5
ffff
42
f8ffff
4e
faffff
m_RenameOverlay
:
m_UserAcceptedRename
:
0
m_Name
:
...
...
@@ -432,7 +432,7 @@ MonoBehaviour:
x
:
2883
y
:
73
width
:
925
height
:
5
85
height
:
5
07
m_SerializedDataModeController
:
m_DataMode
:
0
m_PreferredDataMode
:
0
...
...
@@ -973,9 +973,9 @@ MonoBehaviour:
m_PlayAudio
:
0
m_AudioPlay
:
0
m_Position
:
m_Target
:
{
x
:
369.2168
,
y
:
298.0991
,
z
:
29.528261
}
m_Target
:
{
x
:
-204.83853
,
y
:
87.765724
,
z
:
-20.897873
}
speed
:
2
m_Value
:
{
x
:
369.2168
,
y
:
298.0991
,
z
:
29.528261
}
m_Value
:
{
x
:
-230.19159
,
y
:
82.14267
,
z
:
-20.423363
}
m_RenderMode
:
0
m_CameraMode
:
drawMode
:
0
...
...
@@ -1025,9 +1025,9 @@ MonoBehaviour:
speed
:
2
m_Value
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_Size
:
m_Target
:
774.3644
m_Target
:
1101.9111
speed
:
2
m_Value
:
774.364
4
m_Value
:
1054.460
4
m_Ortho
:
m_Target
:
1
speed
:
2
...
...
@@ -1075,9 +1075,9 @@ MonoBehaviour:
m_Pos
:
serializedVersion
:
2
x
:
2560
y
:
6
79
y
:
6
01
width
:
1249
height
:
360
height
:
438
m_SerializedDataModeController
:
m_DataMode
:
0
m_PreferredDataMode
:
0
...
...
@@ -1099,7 +1099,7 @@ MonoBehaviour:
m_SkipHidden
:
0
m_SearchArea
:
1
m_Folders
:
-
Assets/Sc
ripts/sdk/util
-
Assets/Sc
enes
m_Globs
:
[]
m_OriginalText
:
m_ImportLogFlags
:
0
...
...
@@ -1107,16 +1107,16 @@ MonoBehaviour:
m_ViewMode
:
1
m_StartGridSize
:
64
m_LastFolders
:
-
Assets/Sc
ripts/sdk/util
-
Assets/Sc
enes
m_LastFoldersGridSize
:
-1
m_LastProjectPath
:
D:\work\REMOTE_RESORURCE\UnityDemo
m_LockTracker
:
m_IsLocked
:
0
m_FolderTreeState
:
scrollPos
:
{
x
:
0
,
y
:
0
}
m_SelectedIDs
:
4067
0000
m_LastClickedID
:
2
6432
m_ExpandedIDs
:
00000000
186700001a6700001c67
0000
1
e6
70
000
206700002267
000000ca9a3b
m_SelectedIDs
:
7c65
0000
m_LastClickedID
:
2
5980
m_ExpandedIDs
:
00000000
606500007865
0000
7
e6
5
000
08665
000000ca9a3b
m_RenameOverlay
:
m_UserAcceptedRename
:
0
m_Name
:
...
...
@@ -1144,7 +1144,7 @@ MonoBehaviour:
scrollPos
:
{
x
:
0
,
y
:
0
}
m_SelectedIDs
:
m_LastClickedID
:
0
m_ExpandedIDs
:
00000000
186700001a6700001c6700001e670000206700002267
0000
m_ExpandedIDs
:
00000000
6065
0000
m_RenameOverlay
:
m_UserAcceptedRename
:
0
m_Name
:
...
...
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