Meysam Ghorbani
Meysam Ghorbani

Reputation: 105

Unity MenuItem Fading

I want the MenuItem to be transparent But it completely disappears from the list of items.

The script I used:

using UnityEditor;

public class Example 
{
    static bool showMenu = false;
    [MenuItem("GameObject/MY/Test", true)]
    private static bool CreateEmpityMap() { return showMenu; }
    [MenuItem("GameObject/MY/Test", false)]
    private static void CreateEmpityMap(MenuCommand menuCommand)
    {
        
    }
}

Unity version: 2022.2.20

The Current result:

enter image description here

The desired result:

enter image description here

Upvotes: 0

Views: 33

Answers (0)

Related Questions