Add Custom menu Item on Unity System Menu

· 1 min read
Add Custom menu Item on Unity System Menu

What is the Custom menu?

Look at the MyMenu on the top bar:

Unity provides a powerful way to help us to add custom item to its menu, which can help us to do some useful stuff, such as show current FPS (if you don't know how to show FPS, check my other posts), show debug info, etc.

Create a C# script and add it to the game manager or main camera.

using UnityEngine;
using UnityEditor;

public class ShowMenuItem : MonoBehaviour
{
    [MenuItem("MyMenu/ShowLog")]
    static void showLog() {
        Debug.Log("show log from menu");
    }
}