docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IMenuFiller

    Allows populating a context menu in the HudWindow menu button.

    Namespace: Unity.SimulationPro.Foundation
    Assembly: Unity.SimulationPro.Foundation.dll
    Syntax
    public interface IMenuFiller
    Remarks

    Implement this interface and pass it to SetGUIMenu(Action<IMenuFiller>) to provide a context menu that appears when the user clicks the HUD window's menu button.

    Methods

    AddItem(GUIContent, bool, Action)

    Adds a menu item with the specified label, checked state, and selection callback.

    Declaration
    void AddItem(GUIContent name, bool selected, Action callback)
    Parameters
    Type Name Description
    GUIContent name

    The display content (label) for the menu item.

    bool selected

    Whether the item appears with a checkmark.

    Action callback

    The action invoked when the user selects this item.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)