You've successfully subscribed to Hacking with Unity - Learn how to create your own games
Great! Next, complete checkout for full access to Hacking with Unity - Learn how to create your own games
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.

Add Custom menu Item on Unity System Menu

Ben Liu
Ben Liu

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");
    }
}

Ben Liu

Please feel free to contact me if you have any question. <br> https://t.me/NeedoneApp