Sometimes, we want to create and display a new panel as part of an Editor Extension. In this recipe, we create a menu item that creates and displays a new panel, displaying some text information:

Sometimes, we want to create and display a new panel as part of an Editor Extension. In this recipe, we create a menu item that creates and displays a new panel, displaying some text information:
To display a panel with text data, follow these steps:
using UnityEditor;
using UnityEngine;
public class InformationPanel : EditorWindow
{
[MenuItem("My Game/Info Panel")]
public static void ShowWindow()
{
GetWindow<InformationPanel>("My Game", true);
}
private void...