using UnityEngine; 
 | 
using UnityEditor; 
 | 
  
 | 
public class SafeAreaUISetting : EditorWindow 
 | 
{ 
 | 
  
 | 
    [MenuItem("Tools/UI安全区适配")] 
 | 
    private static void ShowWindow() 
 | 
    { 
 | 
        var window = GetWindow<SafeAreaUISetting>(); 
 | 
        window.titleContent = new GUIContent("SafeAreaUISetting"); 
 | 
        window.Show(); 
 | 
    } 
 | 
  
 | 
    private void OnGUI() 
 | 
    { 
 | 
        EditorGUILayout.Space(10); 
 | 
        SafeAreaUI.Sim = (SafeAreaUI.SimDevice)EditorGUILayout.EnumPopup("模拟设备", SafeAreaUI.Sim); 
 | 
    } 
 | 
} 
 |