com.typhoon.unitysdk 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/EditorIcons.cs +27 -45
- package/Editor/Interactive/test_banner.png +0 -0
- package/Editor/Interactive/{sdk_banner.png.meta → test_banner.png.meta} +6 -6
- package/Editor/Interactive/test_banner_2.png +0 -0
- package/Editor/Interactive/{sdk_close.png.meta → test_banner_2.png.meta} +25 -1
- package/Editor/Interactive/test_float_icon_1.png +0 -0
- package/Editor/Interactive/{sdk_/345/244/261/350/264/245/350/277/224/345/233/236.png.meta → test_float_icon_1.png.meta} +25 -1
- package/Editor/Interactive/test_float_icon_2.png +0 -0
- package/Editor/Interactive/{sdk_white_4x4.png.meta → test_float_icon_2.png.meta} +25 -1
- package/Editor/Interactive/test_float_icon_3.png +0 -0
- package/Editor/Interactive/test_float_icon_3.png.meta +144 -0
- package/Editor/Interactive/test_float_icon_4.png +0 -0
- package/Editor/Interactive/test_float_icon_4.png.meta +144 -0
- package/Editor/Interactive/test_inters.png +0 -0
- package/Editor/Interactive/test_inters.png.meta +144 -0
- package/Editor/Interactive/test_native.png +0 -0
- package/Editor/Interactive/test_native.png.meta +144 -0
- package/Editor/InteractiveSources.asset +23 -0
- package/Editor/{Interactive/SDKInteractiveUI.prefab.meta → InteractiveSources.asset.meta} +3 -2
- package/Editor/PreferencesWindow.cs +8 -9
- package/Editor/PublishSettingGUIDrawer.cs +4 -1
- package/Editor/PublishVivoBatSettingWindow.cs +3 -4
- package/Editor/PublishWindow.cs +39 -29
- package/Editor/Skin.guiskin +119 -864
- package/Editor/SkinLight.guiskin +1994 -0
- package/Editor/SkinLight.guiskin.meta +8 -0
- package/Editor/Skins.cs +20 -1
- package/Editor/SkinsTexture.asset +133 -0
- package/Editor/SkinsTexture.asset.meta +8 -0
- package/Editor/Styles.cs +3 -14
- package/Editor/StylesExtension.cs +7 -5
- package/Editor/Texture/{btn_active.png.meta → dark_active.png.meta} +120 -120
- package/Editor/Texture/{btn_hover.png.meta → dark_hover.png.meta} +120 -120
- package/Editor/Texture/{btn_normal.png.meta → dark_normal.png.meta} +120 -120
- package/Editor/Texture/icon_android.png.meta +120 -120
- package/Editor/Texture/icon_douyin.png.meta +120 -120
- package/Editor/Texture/icon_download.png +0 -0
- package/Editor/Texture/icon_download.png.meta +120 -120
- package/Editor/Texture/icon_extension.png +0 -0
- package/Editor/Texture/icon_extension.png.meta +120 -120
- package/Editor/Texture/icon_googleplay.png.meta +120 -120
- package/Editor/Texture/icon_html5.png.meta +120 -120
- package/Editor/Texture/icon_import.png +0 -0
- package/Editor/Texture/icon_ios.png.meta +120 -120
- package/Editor/Texture/icon_oppo.png.meta +120 -120
- package/Editor/Texture/icon_refresh.png +0 -0
- package/Editor/Texture/icon_refresh.png.meta +120 -120
- package/Editor/Texture/icon_save.png +0 -0
- package/Editor/Texture/icon_save.png.meta +120 -120
- package/Editor/Texture/icon_search.png +0 -0
- package/Editor/Texture/{btn_blue_active.png.meta → icon_search.png.meta} +25 -1
- package/Editor/Texture/icon_vivo.png.meta +120 -120
- package/Editor/Texture/icon_wechat.png.meta +120 -120
- package/Editor/Texture/light_active.png +0 -0
- package/Editor/Texture/{btn_blue_hover.png.meta → light_active.png.meta} +25 -1
- package/Editor/Texture/light_hover.png +0 -0
- package/Editor/Texture/light_hover.png.meta +144 -0
- package/Editor/Texture/light_normal.png +0 -0
- package/Editor/Texture/light_normal.png.meta +144 -0
- package/Editor/Texture/tex_select.png.meta +120 -120
- package/Runtime/InteractiveSources.cs +34 -0
- package/{Editor/OriginalStyles.cs.meta → Runtime/InteractiveSources.cs.meta} +1 -1
- package/Runtime/SDKInteractiveUI.cs +432 -117
- package/Runtime/SdkTestInUnity.cs +2 -0
- package/Runtime/TyphoonSdk.cs +75 -97
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor/PublishChinaAndroidAAR.cs +2 -2
- package/package.json +1 -1
- package/Editor/Interactive/SDKInteractiveUI.prefab +0 -3026
- package/Editor/Interactive/sdk_banner.png +0 -0
- package/Editor/Interactive/sdk_close.png +0 -0
- package/Editor/Interactive/sdk_inters.png +0 -0
- package/Editor/Interactive/sdk_inters.png.meta +0 -120
- package/Editor/Interactive/sdk_white_4x4.png +0 -0
- package/Editor/Interactive/sdk_/345/244/261/350/264/245/350/277/224/345/233/236.png +0 -0
- package/Editor/Interactive/sdk_/346/202/254/346/265/256/345/271/277/345/221/212.png +0 -0
- package/Editor/Interactive/sdk_/346/202/254/346/265/256/345/271/277/345/221/212.png.meta +0 -120
- package/Editor/Interactive/sdk_/346/210/220/345/212/237/350/277/224/345/233/236.png +0 -0
- package/Editor/Interactive/sdk_/346/210/220/345/212/237/350/277/224/345/233/236.png.meta +0 -120
- package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/345/216/237/347/224/237/346/250/241/346/235/277.png +0 -0
- package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/345/216/237/347/224/237/346/250/241/346/235/277.png.meta +0 -120
- package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/346/217/222/351/241/265/345/271/277/345/221/212.png +0 -0
- package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/346/217/222/351/241/265/345/271/277/345/221/212.png.meta +0 -120
- package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/350/247/206/351/242/221/345/271/277/345/221/212.png +0 -0
- package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/350/247/206/351/242/221/345/271/277/345/221/212.png.meta +0 -120
- package/Editor/OriginalStyles.cs +0 -708
- package/Editor/StyleEditorWindow.cs +0 -23
- package/Editor/StyleEditorWindow.cs.meta +0 -11
- package/Editor/Texture/btn_blue_active.png +0 -0
- package/Editor/Texture/btn_blue_hover.png +0 -0
- package/Editor/Texture/btn_blue_normal.png +0 -0
- package/Editor/Texture/btn_blue_normal.png.meta +0 -120
- package/Editor/Texture/btn_green_active.png +0 -0
- package/Editor/Texture/btn_green_active.png.meta +0 -120
- package/Editor/Texture/btn_green_hover.png +0 -0
- package/Editor/Texture/btn_green_hover.png.meta +0 -120
- package/Editor/Texture/btn_green_normal.png +0 -0
- package/Editor/Texture/btn_green_normal.png.meta +0 -120
- package/Editor/Texture/btn_yellow_active.png +0 -0
- package/Editor/Texture/btn_yellow_active.png.meta +0 -120
- package/Editor/Texture/btn_yellow_hover.png +0 -0
- package/Editor/Texture/btn_yellow_hover.png.meta +0 -120
- package/Editor/Texture/btn_yellow_normal.png +0 -0
- package/Editor/Texture/btn_yellow_normal.png.meta +0 -120
- /package/Editor/Texture/{btn_active.png → dark_active.png} +0 -0
- /package/Editor/Texture/{btn_hover.png → dark_hover.png} +0 -0
- /package/Editor/Texture/{btn_normal.png → dark_normal.png} +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 1342752c873f2bd419b0a72b147c5b53
|
|
3
|
+
TextureImporter:
|
|
4
|
+
internalIDToNameTable: []
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
serializedVersion: 11
|
|
7
|
+
mipmaps:
|
|
8
|
+
mipMapMode: 0
|
|
9
|
+
enableMipMap: 0
|
|
10
|
+
sRGBTexture: 1
|
|
11
|
+
linearTexture: 0
|
|
12
|
+
fadeOut: 0
|
|
13
|
+
borderMipMap: 0
|
|
14
|
+
mipMapsPreserveCoverage: 0
|
|
15
|
+
alphaTestReferenceValue: 0.5
|
|
16
|
+
mipMapFadeDistanceStart: 1
|
|
17
|
+
mipMapFadeDistanceEnd: 3
|
|
18
|
+
bumpmap:
|
|
19
|
+
convertToNormalMap: 0
|
|
20
|
+
externalNormalMap: 0
|
|
21
|
+
heightScale: 0.25
|
|
22
|
+
normalMapFilter: 0
|
|
23
|
+
isReadable: 0
|
|
24
|
+
streamingMipmaps: 0
|
|
25
|
+
streamingMipmapsPriority: 0
|
|
26
|
+
vTOnly: 0
|
|
27
|
+
grayScaleToAlpha: 0
|
|
28
|
+
generateCubemap: 6
|
|
29
|
+
cubemapConvolution: 0
|
|
30
|
+
seamlessCubemap: 0
|
|
31
|
+
textureFormat: 1
|
|
32
|
+
maxTextureSize: 2048
|
|
33
|
+
textureSettings:
|
|
34
|
+
serializedVersion: 2
|
|
35
|
+
filterMode: 1
|
|
36
|
+
aniso: 1
|
|
37
|
+
mipBias: 0
|
|
38
|
+
wrapU: 1
|
|
39
|
+
wrapV: 1
|
|
40
|
+
wrapW: 0
|
|
41
|
+
nPOTScale: 0
|
|
42
|
+
lightmap: 0
|
|
43
|
+
compressionQuality: 50
|
|
44
|
+
spriteMode: 1
|
|
45
|
+
spriteExtrude: 1
|
|
46
|
+
spriteMeshType: 1
|
|
47
|
+
alignment: 0
|
|
48
|
+
spritePivot: {x: 0.5, y: 0.5}
|
|
49
|
+
spritePixelsToUnits: 100
|
|
50
|
+
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
51
|
+
spriteGenerateFallbackPhysicsShape: 1
|
|
52
|
+
alphaUsage: 1
|
|
53
|
+
alphaIsTransparency: 1
|
|
54
|
+
spriteTessellationDetail: -1
|
|
55
|
+
textureType: 8
|
|
56
|
+
textureShape: 1
|
|
57
|
+
singleChannelComponent: 0
|
|
58
|
+
flipbookRows: 1
|
|
59
|
+
flipbookColumns: 1
|
|
60
|
+
maxTextureSizeSet: 0
|
|
61
|
+
compressionQualitySet: 0
|
|
62
|
+
textureFormatSet: 0
|
|
63
|
+
ignorePngGamma: 0
|
|
64
|
+
applyGammaDecoding: 0
|
|
65
|
+
platformSettings:
|
|
66
|
+
- serializedVersion: 3
|
|
67
|
+
buildTarget: DefaultTexturePlatform
|
|
68
|
+
maxTextureSize: 2048
|
|
69
|
+
resizeAlgorithm: 0
|
|
70
|
+
textureFormat: -1
|
|
71
|
+
textureCompression: 1
|
|
72
|
+
compressionQuality: 50
|
|
73
|
+
crunchedCompression: 0
|
|
74
|
+
allowsAlphaSplitting: 0
|
|
75
|
+
overridden: 0
|
|
76
|
+
androidETC2FallbackOverride: 0
|
|
77
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
78
|
+
- serializedVersion: 3
|
|
79
|
+
buildTarget: Standalone
|
|
80
|
+
maxTextureSize: 2048
|
|
81
|
+
resizeAlgorithm: 0
|
|
82
|
+
textureFormat: -1
|
|
83
|
+
textureCompression: 1
|
|
84
|
+
compressionQuality: 50
|
|
85
|
+
crunchedCompression: 0
|
|
86
|
+
allowsAlphaSplitting: 0
|
|
87
|
+
overridden: 0
|
|
88
|
+
androidETC2FallbackOverride: 0
|
|
89
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
90
|
+
- serializedVersion: 3
|
|
91
|
+
buildTarget: iPhone
|
|
92
|
+
maxTextureSize: 2048
|
|
93
|
+
resizeAlgorithm: 0
|
|
94
|
+
textureFormat: -1
|
|
95
|
+
textureCompression: 1
|
|
96
|
+
compressionQuality: 50
|
|
97
|
+
crunchedCompression: 0
|
|
98
|
+
allowsAlphaSplitting: 0
|
|
99
|
+
overridden: 0
|
|
100
|
+
androidETC2FallbackOverride: 0
|
|
101
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
102
|
+
- serializedVersion: 3
|
|
103
|
+
buildTarget: WebGL
|
|
104
|
+
maxTextureSize: 2048
|
|
105
|
+
resizeAlgorithm: 0
|
|
106
|
+
textureFormat: -1
|
|
107
|
+
textureCompression: 1
|
|
108
|
+
compressionQuality: 50
|
|
109
|
+
crunchedCompression: 0
|
|
110
|
+
allowsAlphaSplitting: 0
|
|
111
|
+
overridden: 0
|
|
112
|
+
androidETC2FallbackOverride: 0
|
|
113
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
114
|
+
- serializedVersion: 3
|
|
115
|
+
buildTarget: Android
|
|
116
|
+
maxTextureSize: 2048
|
|
117
|
+
resizeAlgorithm: 0
|
|
118
|
+
textureFormat: -1
|
|
119
|
+
textureCompression: 1
|
|
120
|
+
compressionQuality: 50
|
|
121
|
+
crunchedCompression: 0
|
|
122
|
+
allowsAlphaSplitting: 0
|
|
123
|
+
overridden: 0
|
|
124
|
+
androidETC2FallbackOverride: 0
|
|
125
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
126
|
+
spriteSheet:
|
|
127
|
+
serializedVersion: 2
|
|
128
|
+
sprites: []
|
|
129
|
+
outline: []
|
|
130
|
+
physicsShape: []
|
|
131
|
+
bones: []
|
|
132
|
+
spriteID: 5e97eb03825dee720800000000000000
|
|
133
|
+
internalID: 0
|
|
134
|
+
vertices: []
|
|
135
|
+
indices:
|
|
136
|
+
edges: []
|
|
137
|
+
weights: []
|
|
138
|
+
secondaryTextures: []
|
|
139
|
+
spritePackingTag:
|
|
140
|
+
pSDRemoveMatte: 0
|
|
141
|
+
pSDShowRemoveMatteOption: 0
|
|
142
|
+
userData:
|
|
143
|
+
assetBundleName:
|
|
144
|
+
assetBundleVariant:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!114 &11400000
|
|
4
|
+
MonoBehaviour:
|
|
5
|
+
m_ObjectHideFlags: 0
|
|
6
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
+
m_PrefabInstance: {fileID: 0}
|
|
8
|
+
m_PrefabAsset: {fileID: 0}
|
|
9
|
+
m_GameObject: {fileID: 0}
|
|
10
|
+
m_Enabled: 1
|
|
11
|
+
m_EditorHideFlags: 0
|
|
12
|
+
m_Script: {fileID: 11500000, guid: d618400c29489154a8e54a537e920476, type: 3}
|
|
13
|
+
m_Name: InteractiveSources
|
|
14
|
+
m_EditorClassIdentifier:
|
|
15
|
+
Texture2Ds:
|
|
16
|
+
- {fileID: 2800000, guid: 09146621f89d84247ad264913de8404d, type: 3}
|
|
17
|
+
- {fileID: 2800000, guid: 2de72b376d420254393982d84f3f41ca, type: 3}
|
|
18
|
+
- {fileID: 2800000, guid: d1ec77e647198434784dffd8b02b6e26, type: 3}
|
|
19
|
+
- {fileID: 2800000, guid: e0465c23f8a29784f9676b2a6e442ef7, type: 3}
|
|
20
|
+
- {fileID: 2800000, guid: cd0df8fe09ca141488eea923ab165ce1, type: 3}
|
|
21
|
+
- {fileID: 2800000, guid: 9f6b6c9d98ba08347887bb5a599b29a0, type: 3}
|
|
22
|
+
- {fileID: 2800000, guid: 4f0dcc93a5975224199b78c2e62b251c, type: 3}
|
|
23
|
+
- {fileID: 2800000, guid: 1342752c873f2bd419b0a72b147c5b53, type: 3}
|
|
@@ -7,7 +7,7 @@ using Object = UnityEngine.Object;
|
|
|
7
7
|
|
|
8
8
|
namespace TyphoonUnitySDK
|
|
9
9
|
{
|
|
10
|
-
public class PreferencesWindow :
|
|
10
|
+
public class PreferencesWindow : EditorWindow
|
|
11
11
|
{
|
|
12
12
|
/// <summary>
|
|
13
13
|
/// 绑定重绘逻辑
|
|
@@ -50,9 +50,8 @@ namespace TyphoonUnitySDK
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
protected
|
|
53
|
+
protected void OnGUI()
|
|
54
54
|
{
|
|
55
|
-
base.OnDrawGUI();
|
|
56
55
|
var rect = new Rect(0, 0, position.width, position.height);
|
|
57
56
|
var area = rect;
|
|
58
57
|
area.height -= 8;
|
|
@@ -65,7 +64,7 @@ namespace TyphoonUnitySDK
|
|
|
65
64
|
rectSave.x = area.width - rectSave.width;
|
|
66
65
|
rectSave.x -= 4;
|
|
67
66
|
rectSave.y += 4;
|
|
68
|
-
if (GUI.Button(rectSave, new GUIContent("保存配置", EditorIcons.icon_save), Styles.
|
|
67
|
+
if (GUI.Button(rectSave, new GUIContent("保存配置", EditorIcons.icon_save), Styles.rbutton))
|
|
69
68
|
{
|
|
70
69
|
EditorUtility.SetDirty(Preferences.Default);
|
|
71
70
|
AssetDatabase.SaveAssets();
|
|
@@ -124,7 +123,7 @@ namespace TyphoonUnitySDK
|
|
|
124
123
|
var color = GUI.color;
|
|
125
124
|
if (!UniEditor.GradleIsMatch())
|
|
126
125
|
{
|
|
127
|
-
GUILayout.Label(new GUIContent("未配置gradle路径", EditorIcons.icon_error), Styles.
|
|
126
|
+
GUILayout.Label(new GUIContent("未配置gradle路径", EditorIcons.icon_error), Styles.rbold_label,
|
|
128
127
|
GUILayout.Height(24));
|
|
129
128
|
color = GUI.color;
|
|
130
129
|
GUI.color = Color.green;
|
|
@@ -135,17 +134,17 @@ namespace TyphoonUnitySDK
|
|
|
135
134
|
}
|
|
136
135
|
else
|
|
137
136
|
{
|
|
138
|
-
GUILayout.Label(new GUIContent("gradle路径", EditorIcons.icon_success), Styles.
|
|
137
|
+
GUILayout.Label(new GUIContent("gradle路径", EditorIcons.icon_success), Styles.rbold_label,
|
|
139
138
|
GUILayout.Height(24));
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
GUILayout.BeginHorizontal();
|
|
143
|
-
GUILayout.Label("目录:", Styles.
|
|
142
|
+
GUILayout.Label("目录:", Styles.rbold_title, GUILayout.Width(40),GUILayout.Height(44));
|
|
144
143
|
color = GUI.color;
|
|
145
|
-
GUI.color = error ? Color.red : color;
|
|
144
|
+
GUI.color = error ? Color.red*0.7f : color;
|
|
146
145
|
preferences.GradlePath = GUILayout.TextArea(preferences.GradlePath, GUILayout.Height(44));
|
|
147
146
|
GUI.color = color;
|
|
148
|
-
if (GUILayout.Button("选择", GUILayout.Width(60)))
|
|
147
|
+
if (GUILayout.Button("选择", GUILayout.Width(60),GUILayout.Height(44)))
|
|
149
148
|
{
|
|
150
149
|
// 获取当前用户的 Windows 用户文件夹路径
|
|
151
150
|
var userFolder = UniEditor.GetWindowUserFolder();
|
|
@@ -141,6 +141,7 @@ namespace TyphoonUnitySDK
|
|
|
141
141
|
/*重绘EnableSignature*/
|
|
142
142
|
private static bool DrawProperty_EnableSignature(PublishSetting setting)
|
|
143
143
|
{
|
|
144
|
+
|
|
144
145
|
return setting.BuildTarget != BuildTarget.Android;
|
|
145
146
|
}
|
|
146
147
|
|
|
@@ -256,7 +257,9 @@ namespace TyphoonUnitySDK
|
|
|
256
257
|
|
|
257
258
|
GUILayout.BeginHorizontal();
|
|
258
259
|
GUILayout.Label("关联profile", GUILayout.Width(142));
|
|
259
|
-
|
|
260
|
+
var txt = setting.AAUseProfile;
|
|
261
|
+
txt = string.IsNullOrEmpty(txt) ? "请选择" : txt;
|
|
262
|
+
if (GUILayout.Button(txt, Styles.DropDownButtonLeft))
|
|
260
263
|
{
|
|
261
264
|
AddressableSupport.PopUpProfileSelectorMenu(setting);
|
|
262
265
|
}
|
|
@@ -3,7 +3,7 @@ using UnityEngine;
|
|
|
3
3
|
|
|
4
4
|
namespace TyphoonUnitySDK
|
|
5
5
|
{
|
|
6
|
-
public class PublishVivoBatSettingWindow :
|
|
6
|
+
public class PublishVivoBatSettingWindow : EditorWindow
|
|
7
7
|
{
|
|
8
8
|
[MenuItem("临时发布/发布vivo", priority = 10000)]
|
|
9
9
|
public static void Open()
|
|
@@ -36,9 +36,8 @@ namespace TyphoonUnitySDK
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
protected
|
|
39
|
+
protected void OnGUI()
|
|
40
40
|
{
|
|
41
|
-
base.OnDrawGUI();
|
|
42
41
|
var rect = new Rect(0, 0, position.width, position.height);
|
|
43
42
|
var area = rect;
|
|
44
43
|
area.height -= 8;
|
|
@@ -52,7 +51,7 @@ namespace TyphoonUnitySDK
|
|
|
52
51
|
rectSave.x -= 4;
|
|
53
52
|
GUILayout.Space(36);
|
|
54
53
|
Editor.OnInspectorGUI();
|
|
55
|
-
if (GUI.Button(rectSave, new GUIContent("保存配置", EditorIcons.icon_save), Styles.
|
|
54
|
+
if (GUI.Button(rectSave, new GUIContent("保存配置", EditorIcons.icon_save), Styles.rbutton_bold))
|
|
56
55
|
{
|
|
57
56
|
EditorUtility.SetDirty(PublishVivoBatSetting.Default);
|
|
58
57
|
AssetDatabase.SaveAssets();
|
package/Editor/PublishWindow.cs
CHANGED
|
@@ -5,7 +5,7 @@ using UnityEngine;
|
|
|
5
5
|
|
|
6
6
|
namespace TyphoonUnitySDK
|
|
7
7
|
{
|
|
8
|
-
public class PublishWindow :
|
|
8
|
+
public class PublishWindow : EditorWindow
|
|
9
9
|
{
|
|
10
10
|
//锁定,未开放
|
|
11
11
|
private static HashSet<AppChannel> _LockChannel = new HashSet<AppChannel>()
|
|
@@ -76,9 +76,9 @@ namespace TyphoonUnitySDK
|
|
|
76
76
|
ReloadSettings();
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
protected
|
|
79
|
+
protected void OnGUI()
|
|
80
80
|
{
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
var temEnable = GUI.enabled;
|
|
83
83
|
if (EditorApplication.isPlaying)
|
|
84
84
|
{
|
|
@@ -89,7 +89,9 @@ namespace TyphoonUnitySDK
|
|
|
89
89
|
var rect = new Rect(0, 0, position.width, position.height);
|
|
90
90
|
if (EditorApplication.isCompiling)
|
|
91
91
|
{
|
|
92
|
-
|
|
92
|
+
var tipRect = rect;
|
|
93
|
+
tipRect.height = 44;
|
|
94
|
+
GUI.TextArea(tipRect, "编译中,请稍等...\n\r", Styles.rbold_title);
|
|
93
95
|
}
|
|
94
96
|
else
|
|
95
97
|
{
|
|
@@ -120,23 +122,24 @@ namespace TyphoonUnitySDK
|
|
|
120
122
|
rectToolbar.height = 22;
|
|
121
123
|
GUILayout.BeginArea(rectToolbar);
|
|
122
124
|
GUILayout.BeginHorizontal();
|
|
123
|
-
GUILayout.Label("发布配置", Styles.
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
GUILayout.Label("发布配置", Styles.rbold_label,GUILayout.Width(110));
|
|
126
|
+
GUILayout.Space(1);
|
|
127
|
+
if (GUILayout.Button(new GUIContent(EditorIcons.icon_import, "导入常用配置"), Styles.rbutton,
|
|
128
|
+
GUILayout.Width(40),GUILayout.Height(20)))
|
|
126
129
|
{
|
|
127
130
|
UniEditor.ImportPackage(UniEditor.PackagePath_PublishSetting);
|
|
128
131
|
}
|
|
129
|
-
|
|
130
|
-
if (GUILayout.Button(new GUIContent(EditorIcons.icon_refresh, "刷新"), Styles.
|
|
131
|
-
GUILayout.Width(40)))
|
|
132
|
+
GUILayout.Space(1);
|
|
133
|
+
if (GUILayout.Button(new GUIContent(EditorIcons.icon_refresh, "刷新"), Styles.rbutton,
|
|
134
|
+
GUILayout.Width(40),GUILayout.Height(20)))
|
|
132
135
|
{
|
|
133
136
|
ReloadSettings();
|
|
134
137
|
Repaint();
|
|
135
138
|
}
|
|
139
|
+
GUILayout.Space(1);
|
|
136
140
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
GUILayout.Width(40)))
|
|
141
|
+
if (GUILayout.Button(new GUIContent(EditorIcons.icon_extension, "更多"), Styles.rbutton,
|
|
142
|
+
GUILayout.Width(40),GUILayout.Height(20)))
|
|
140
143
|
{
|
|
141
144
|
var menu = new GenericMenu();
|
|
142
145
|
menu.AddItem(new GUIContent("导入常用配置"), false,
|
|
@@ -149,7 +152,10 @@ namespace TyphoonUnitySDK
|
|
|
149
152
|
var rectSearch = rectLeftMenu;
|
|
150
153
|
rectSearch.y = rectToolbar.yMax;
|
|
151
154
|
rectSearch.height = 22;
|
|
152
|
-
InputTxtSearchSetting = GUI.TextField(rectSearch, InputTxtSearchSetting
|
|
155
|
+
InputTxtSearchSetting = GUI.TextField(rectSearch, InputTxtSearchSetting);
|
|
156
|
+
if(string.IsNullOrEmpty(InputTxtSearchSetting)){
|
|
157
|
+
GUI.Label(rectSearch,"搜索...",Styles.rlabel_italic);
|
|
158
|
+
}
|
|
153
159
|
|
|
154
160
|
/*绘制菜单栏*/
|
|
155
161
|
var rectPos = rectLeftMenu;
|
|
@@ -194,6 +200,14 @@ namespace TyphoonUnitySDK
|
|
|
194
200
|
{
|
|
195
201
|
_select = setting;
|
|
196
202
|
}
|
|
203
|
+
|
|
204
|
+
if (_LockChannel.Contains(setting.Channel))
|
|
205
|
+
{
|
|
206
|
+
var lockRect = rectItem;
|
|
207
|
+
lockRect.width = 60;
|
|
208
|
+
lockRect.x = rectItem.xMax - lockRect.width;
|
|
209
|
+
GUI.Label(lockRect,"未开放");
|
|
210
|
+
}
|
|
197
211
|
}
|
|
198
212
|
|
|
199
213
|
index += 1;
|
|
@@ -204,7 +218,7 @@ namespace TyphoonUnitySDK
|
|
|
204
218
|
{
|
|
205
219
|
var rectImport = rectPos;
|
|
206
220
|
rectImport.height = MENU_ITEM_HEIGHT;
|
|
207
|
-
if (GUI.Button(rectImport, new GUIContent("导入常用配置", EditorIcons.icon_import), Styles.
|
|
221
|
+
if (GUI.Button(rectImport, new GUIContent("导入常用配置", EditorIcons.icon_import), Styles.rbutton))
|
|
208
222
|
{
|
|
209
223
|
UniEditor.ImportPackage(UniEditor.PackagePath_PublishSetting);
|
|
210
224
|
}
|
|
@@ -227,16 +241,19 @@ namespace TyphoonUnitySDK
|
|
|
227
241
|
rectContent.height -= 8;
|
|
228
242
|
rectContent.width -= 8;
|
|
229
243
|
rectContent.center = rect.center;
|
|
244
|
+
|
|
230
245
|
if (_select == null)
|
|
231
246
|
{
|
|
232
|
-
|
|
247
|
+
var tipRect = rectContent;
|
|
248
|
+
tipRect.height = 44;
|
|
249
|
+
GUI.TextArea(tipRect, "请选择配置...\n\r初次使用,可从左侧菜单栏中导入常用配置", Styles.rbold_title);
|
|
233
250
|
}
|
|
234
251
|
else
|
|
235
252
|
{
|
|
236
253
|
var rectTitle = rectContent;
|
|
237
254
|
rectTitle.height = 32;
|
|
238
|
-
EditorGUI.DrawRect(rectTitle,
|
|
239
|
-
GUI.Label(rectTitle, $"{_select.name}", Styles.
|
|
255
|
+
EditorGUI.DrawRect(rectTitle, Skins.PublishWindowTitleBgColor);
|
|
256
|
+
GUI.Label(rectTitle, $"{_select.name}", Styles.rbold_title);
|
|
240
257
|
var rectSave = rectTitle;
|
|
241
258
|
rectSave.width = 60;
|
|
242
259
|
rectSave.x = rectTitle.xMax - rectSave.width;
|
|
@@ -286,7 +303,7 @@ namespace TyphoonUnitySDK
|
|
|
286
303
|
var rectBtnPublish = rectArea;
|
|
287
304
|
rectBtnPublish.width = 128;
|
|
288
305
|
rectBtnPublish.x = rectArea.xMax - rectBtnPublish.width;
|
|
289
|
-
bool clickPublish = GUI.Button(rectBtnPublish, "发布", Styles.
|
|
306
|
+
bool clickPublish = GUI.Button(rectBtnPublish, "发布", Styles.rbutton_bold);
|
|
290
307
|
|
|
291
308
|
var rectNextBtn = rectBtnPublish;
|
|
292
309
|
rectNextBtn.x -= 2;
|
|
@@ -295,16 +312,16 @@ namespace TyphoonUnitySDK
|
|
|
295
312
|
var index = 0;
|
|
296
313
|
if (UniEditor.HasAddressableSupport())
|
|
297
314
|
{
|
|
298
|
-
clickBuildAA = GUI.Button(rectNextBtn, "构建AA", Styles.
|
|
315
|
+
clickBuildAA = GUI.Button(rectNextBtn, "构建AA", Styles.rbutton_bold);
|
|
299
316
|
rectNextBtn.x -= 2;
|
|
300
317
|
rectNextBtn.x -= rectNextBtn.width;
|
|
301
318
|
}
|
|
302
319
|
|
|
303
|
-
bool clickApply = GUI.Button(rectNextBtn, "应用", Styles.
|
|
320
|
+
bool clickApply = GUI.Button(rectNextBtn, "应用", Styles.rbutton_bold);
|
|
304
321
|
GUILayout.EndArea();
|
|
305
322
|
var rectBarLine = rectBar;
|
|
306
323
|
rectBarLine.height = 2;
|
|
307
|
-
EditorGUI.DrawRect(rectBar, Color.black * 0.2f);
|
|
324
|
+
// EditorGUI.DrawRect(rectBar, Color.black * 0.2f);
|
|
308
325
|
|
|
309
326
|
if (clickApply)
|
|
310
327
|
{
|
|
@@ -327,13 +344,6 @@ namespace TyphoonUnitySDK
|
|
|
327
344
|
}
|
|
328
345
|
|
|
329
346
|
GUI.enabled = temEnable;
|
|
330
|
-
if (isLocked)
|
|
331
|
-
{
|
|
332
|
-
var temColor = GUI.color;
|
|
333
|
-
GUI.color = Color.red;
|
|
334
|
-
GUI.Label(rectBar, "未开放", Styles.ToolbarTitleLab);
|
|
335
|
-
GUI.color = temColor;
|
|
336
|
-
}
|
|
337
347
|
}
|
|
338
348
|
}
|
|
339
349
|
|