void DrawLocalServerGUI() { GUILayout.Space(3); GUILayout.Label("-------------[AssetBundles Local Server]-------------"); GUILayout.Space(3); GUILayout.BeginHorizontal(); var curSelected = (LocalServerType)EditorGUILayout.EnumPopup("Local Server Type : ", localServerType, GUILayout.Width(300)); bool typeChanged = curSelected != localServerType; if (typeChanged) { PackageUtils.SaveLocalServerType(curSelected); localServerType = curSelected; localServerIP = PackageUtils.GetLocalServerIP(); } if (localServerType == LocalServerType.CurrentMachine) { GUILayout.Label(localServerIP); } else { localServerIP = GUILayout.TextField(localServerIP, GUILayout.Width(100)); if (GUILayout.Button("Save", GUILayout.Width(200))) { PackageUtils.SaveLocalServerIP(localServerIP); } } GUILayout.EndHorizontal(); }
public static string GetServerAddressByType(LocalServerType _type) { string addressStr = ""; string defaultStr = _type == LocalServerType.CurrentMachine ? @":7888/Android/Android/" : ":444/pr1/ios/ios/"; addressStr = EditorPrefs.GetString(_type.ToString(), defaultStr); return(addressStr); }
void OnEnable() { buildTarget = EditorUserBuildSettings.activeBuildTarget; channelType = PackageUtils.GetCurSelectedChannel(); localServerType = PackageUtils.GetLocalServerType(); localServerIP = PackageUtils.GetLocalServerIP(); }
void OnEnable() { buildTarget = EditorUserBuildSettings.activeBuildTarget; channelType = PackageUtils.GetCurSelectedChannel(); ReadLocalVersionFile(buildTarget, channelType); localServerType = PackageUtils.GetLocalServerType(); localServerIP = PackageUtils.GetLocalServerIP(); androidBuildABForPerChannel = PackageUtils.GetAndroidBuildABForPerChannelSetting(); iosBuildABForPerChannel = PackageUtils.GetIOSBuildABForPerChannelSetting(); }
void OnEnable() { buildTarget = EditorUserBuildSettings.activeBuildTarget; channelType = PackageUtils.GetCurSelectedChannel(); resVersion = ReadResVersionConfig(); bundleVersion = PlayerSettings.bundleVersion; localServerType = PackageUtils.GetLocalServerType(); localServerIP = PackageUtils.GetLocalServerIP(); androidBuildABForPerChannel = PackageUtils.GetAndroidBuildABForPerChannelSetting(); iosBuildABForPerChannel = PackageUtils.GetIOSBuildABForPerChannelSetting(); }
void DrawLocalServerGUI() { GUILayout.Space(3); GUILayout.Label("-------------[AssetBundles Local Server]-------------"); GUILayout.Space(3); EditorGUI.BeginChangeCheck(); useHTTPsServer = EditorGUILayout.ToggleLeft("Use HTTPs", useHTTPsServer); if (EditorGUI.EndChangeCheck()) { PackageUtils.SetHTTPsServerUsage(useHTTPsServer); } GUILayout.BeginHorizontal(); var curSelected = (LocalServerType)EditorGUILayout.EnumPopup("Local Server Type : ", localServerType, GUILayout.Width(300)); bool typeChanged = curSelected != localServerType; if (typeChanged) { PackageUtils.SaveLocalServerType(curSelected); localServerType = curSelected; localServerIP = PackageUtils.GetLocalServerIP(); localServerAddress = PackageUtils.GetServerAddressByType(localServerType); } if (localServerType == LocalServerType.CurrentMachine) { GUILayout.Label(localServerIP, GUILayout.Width(100)); localServerAddress = GUILayout.TextField(localServerAddress, GUILayout.Width(200)); if (GUILayout.Button("Save", GUILayout.Width(200))) { PackageUtils.SaveServerAddressByType(localServerType, localServerAddress); } } else { localServerIP = GUILayout.TextField(localServerIP, GUILayout.Width(100)); localServerAddress = GUILayout.TextField(localServerAddress, GUILayout.Width(200)); if (GUILayout.Button("Save", GUILayout.Width(200))) { PackageUtils.SaveLocalServerIP(localServerIP); PackageUtils.SaveServerAddressByType(localServerType, localServerAddress); } } GUILayout.EndHorizontal(); }
public static void SaveLocalServerType(LocalServerType type) { EditorPrefs.SetInt(LocalServerPrefsKey, (int)type); }
public static void SaveServerAddressByType(LocalServerType type, string _address) { EditorPrefs.SetString(type.ToString(), _address); }