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:
![](https://static.packt-cdn.com/products/9781788471909/graphics/assets/c0f137bd-4fe3-40cb-bb0d-6bf2240af0b2.png)
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...