private void OnGUI() { GUILayout.Space(10); //文本 Key = EditorGUILayout.TextField("Encrypt Key (加密密码)", Key); GUILayout.Space(30); if (GUILayout.Button("Build Bundles (打包资源)")) { if (Key == null) { EditorUtility.DisplayDialog("Encrypt Failed! (加密失败)", "Please make sure the key has 16 letters! \n请确保加密密码有16位!", "OK"); return; } if (Key.Length == 16) { if (Build == null) { EditorUtility.DisplayDialog("Request Timeout (请求超时)", "Please try again! \n请再次尝试!", "OK"); } else { Build(Key); } window.Close(); } else { EditorUtility.DisplayDialog("Encrypt Failed! (加密失败)", "Please make sure the key has 16 letters! \n请确保加密密码有16位!", "OK"); } } }
private void OnGUI() { GUILayout.Space(10); EditorGUILayout.HelpBox("第一次打AB包需要输入加密密码,后续该信息会保存于JEngine面板内,无需再次输入密码即可打包,想要修改密码直接在JEngine面板里修改即可", MessageType.Info); GUILayout.Space(10); //文本 Key = EditorGUILayout.TextField("Encrypt Key (加密密码)", Key); GUILayout.Space(30); if (GUILayout.Button("Build Bundles (打包资源)")) { if (Key == null) { EditorUtility.DisplayDialog("Encrypt Failed! (加密失败)", "Please make sure the key has 16 letters! \n请确保加密密码有16位!", "OK"); return; } if (Key.Length == 16) { if (Build == null) { EditorUtility.DisplayDialog("Request Timeout (请求超时)", "Please try again! \n请再次尝试!", "OK"); } else { Build(Key); } window.Close(); } else { EditorUtility.DisplayDialog("Encrypt Failed! (加密失败)", "Please make sure the key has 16 letters! \n请确保加密密码有16位!", "OK"); } } }