using System;
using MCPForUnity.Editor.Windows;
using UnityEditor;
namespace MCPForUnity.Editor.Services
{
///
/// Service for managing the EditorPrefs window
/// Follows the Class-level Singleton pattern
///
public class EditorPrefsWindowService
{
private static EditorPrefsWindowService _instance;
///
/// Get the singleton instance
///
public static EditorPrefsWindowService Instance
{
get
{
if (_instance == null)
{
throw new Exception("EditorPrefsWindowService not initialized");
}
return _instance;
}
}
///
/// Initialize the service
///
public static void Initialize()
{
if (_instance == null)
{
_instance = new EditorPrefsWindowService();
}
}
private EditorPrefsWindowService()
{
// Private constructor for singleton
}
///
/// Show the EditorPrefs window
///
public void ShowWindow()
{
EditorPrefsWindow.ShowWindow();
}
}
}