Files
JJBB/Assets/Editor/Scripts/iOS/XCodeSetWindow.cs

36 lines
860 B
C#
Raw Permalink Normal View History

2024-08-23 15:49:34 +08:00
#if UNITY_IOS || UNITY_IPHONE
using System;
using UnityEditor;
using UnityEngine;
public class XCodeSetWindow : EditorWindow
{
private string _platform;
public static string platformKey
{
get { return AssetUtils.GetTextMd5(Application.dataPath) + "_IosSdk"; }
}
private void OnEnable()
{
_platform = PlayerPrefs.GetString(platformKey, string.Empty);
}
private void OnGUI()
{
var temp = EditorGUILayout.TextField("Platform Channel", _platform);
if (!temp.Equals(_platform, StringComparison.Ordinal))
{
_platform = temp;
PlayerPrefs.SetString(platformKey, _platform);
}
}
[MenuItem("Bundle V2/XCode Project/Setting Window")]
public static void Open()
{
GetWindow<XCodeSetWindow>("XCode 自动配置设定");
}
}
#endif