@@ -36,6 +36,13 @@ private void UpdateDataBuild()
3636 CurrentPackageIndex = BuildConfig . PackageName == null
3737 ? 0
3838 : Array . IndexOf ( LookModeDisplayPackages , BuildConfig . PackageName ) ;
39+
40+ if ( BuildConfig . BuildTarget == 0 ||
41+ BuildConfig . BuildTarget == BuildTarget . NoTarget
42+ )
43+ {
44+ BuildConfig . BuildTarget = EditorUserBuildSettings . activeBuildTarget ;
45+ }
3946 }
4047
4148 private void OnDrawBuildBuild ( )
@@ -62,11 +69,13 @@ private void OnDrawBuildBuild()
6269 return ;
6370 }
6471
72+ #if SUPPORT_YOOASSET
6573 if ( GUILayout . Button ( "生成配置" , GP_Width_75 ) )
6674 {
6775 MenuItem_YooAssets . CreateConfig ( BuildConfig . BuildOutputPath ) ;
6876 return ;
6977 }
78+ #endif
7079 }
7180
7281 using ( GELayout . VHorizontal ( ) )
@@ -90,8 +99,8 @@ private void OnDrawBuildBuild()
9099 BuildConfig . ValidateBuild =
91100 GELayout . ToggleLeft ( "验证构建结果" , BuildConfig . ValidateBuild , GP_Width_100 ) ;
92101
93- #if SUPPORT_YOOASSET
94102 GELayout . Separator ( ) ;
103+ #if SUPPORT_YOOASSET
95104 if ( GUILayout . Button ( "构建 Yoo" , GP_Width_75 ) )
96105 {
97106 var BuildCommand = new YooAssetBuildCommand
@@ -106,6 +115,11 @@ private void OnDrawBuildBuild()
106115 YooAssetBuild . ArtBuild ( BuildCommand ) ;
107116 BuildConfig . BuildVersion = DateTime . Now . ToString ( "yyyy-MM-dd-HHmmss" ) ;
108117 }
118+ #else
119+ if ( GUILayout . Button ( "构建" , GP_Width_50 ) )
120+ {
121+ EditorUtility . DisplayDialog ( "提示" , "请先导入 YooAsset Or Other TrdTools" , "确定" ) ;
122+ }
109123#endif
110124 }
111125
@@ -184,7 +198,9 @@ private void OnDrawBuildFTP()
184198 using ( GELayout . VHorizontal ( ) )
185199 {
186200 EditorGUILayout . LabelField ( "地址" , GP_Width_100 ) ;
187- BuildConfig . FTPServerIP = GELayout . Field ( BuildConfig . FTPServerIP ) ;
201+ BuildConfig . FTPServerIP = GELayout . FieldDelayed ( BuildConfig . FTPServerIP ) ;
202+ if ( string . IsNullOrEmpty ( BuildConfig . FTPServerIP ) ) return ;
203+
188204 if ( GUILayout . Button ( "校验" , GP_Width_50 ) )
189205 {
190206 GUI . FocusControl ( null ) ;
@@ -201,31 +217,31 @@ private void OnDrawBuildFTP()
201217 using ( GELayout . VHorizontal ( ) )
202218 {
203219 EditorGUILayout . LabelField ( "端口" , GP_Width_100 ) ;
204- BuildConfig . FTPServerPort = GELayout . Field ( BuildConfig . FTPServerPort ) ;
220+ BuildConfig . FTPServerPort = GELayout . FieldDelayed ( BuildConfig . FTPServerPort ) ;
205221 }
206222
207223 using ( GELayout . VHorizontal ( ) )
208224 {
209225 EditorGUILayout . LabelField ( "用户名" , GP_Width_100 ) ;
210- BuildConfig . FTPUser = GELayout . Field ( BuildConfig . FTPUser ) ;
226+ BuildConfig . FTPUser = GELayout . FieldDelayed ( BuildConfig . FTPUser ) ;
211227 }
212228
213229 using ( GELayout . VHorizontal ( ) )
214230 {
215231 EditorGUILayout . LabelField ( "密码" , GP_Width_100 ) ;
216- BuildConfig . FTPPassword = GELayout . Field ( BuildConfig . FTPPassword ) ;
232+ BuildConfig . FTPPassword = GELayout . FieldDelayed ( BuildConfig . FTPPassword ) ;
217233 }
218234
219235 using ( GELayout . VHorizontal ( ) )
220236 {
221237 EditorGUILayout . LabelField ( "远程路径" , GP_Width_100 ) ;
222- BuildConfig . FTPRemotePath = GELayout . Field ( BuildConfig . FTPRemotePath ) ;
238+ BuildConfig . FTPRemotePath = GELayout . FieldDelayed ( BuildConfig . FTPRemotePath ) ;
223239 }
224240
225241 using ( GELayout . VHorizontal ( ) )
226242 {
227243 EditorGUILayout . LabelField ( "本地路径" , GP_Width_100 ) ;
228- BuildConfig . FTPLocalPath = GELayout . Field ( BuildConfig . FTPLocalPath ) ;
244+ BuildConfig . FTPLocalPath = GELayout . FieldDelayed ( BuildConfig . FTPLocalPath ) ;
229245
230246 if ( GUILayout . Button ( "选择" , GP_Width_50 ) )
231247 {
@@ -265,7 +281,6 @@ private void OnDrawBuildFTP()
265281 {
266282 GUI . FocusControl ( null ) ;
267283 PrPlatform . Open . Path ( BuildConfig . FTPLocalPath ) . Async ( ) ;
268- return ;
269284 }
270285 }
271286 }
0 commit comments