36 lines
860 B
C#
36 lines
860 B
C#
|
#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
|