//
    // Service
    //

    private static DebugInspectorLayout GetInstance()
    {
        if (s_instance == null)
        {
            s_instance = new DebugInspectorLayout();
        }

        return(s_instance);
    }
    //
    // Service
    //

    private static DebugInspectorLayout GetInstance()
    {
        if (s_instance == null)
        {
            s_instance = new DebugInspectorLayout();
        }

        return s_instance;
    }
    public void OnGUI()
    {
        GameObject target = Selection.activeGameObject;

        if (target == null)
        {
            return;
        }

        EditorGUILayout.InspectorTitlebar(true, target);

        m_scrollPos = EditorGUILayout.BeginScrollView(m_scrollPos);

        Component[] components = target.GetComponents <Component>();
        foreach (Component component in components)
        {
            DebugInspectorLayout.ObjectField(component.GetType().Name, component, AssetPreview.GetMiniThumbnail(component));

            EditorGUILayout.Separator();
        }

        EditorGUILayout.EndScrollView();
    }
    //
    // Events
    //

    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        DebugInspectorLayout.DrawDebugView(target as MonoBehaviour);
    }