Version: 2023.2
LanguageEnglish
  • C#

ContextMenuUtility.AddClipboardEntriesTo

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void AddClipboardEntriesTo(UIElements.DropdownMenu menu);

Declaration

public static void AddClipboardEntriesTo(UIElements.DropdownMenu menu, bool cutEnabled, bool copyEnabled, bool pasteEnabled, bool duplicateEnabled, bool deleteEnabled);

Parameters

menu The Scene view context menu to add a clipboard operations to.
cutEnabled Whether to enable the Cut operation in the Scene view context menu. When Cut is disabled, it is greyed out in the Scene view context menu.
copyEnabled Whether to enable the Copy operation in the Scene view context menu. If Copy is disabled, it is greyed out in the Scene view context menu.
pasteEnabled Whether to enable the Paste operation in the Scene view context menu. If Paste is disabled, it is greyed out in the Scene view context menu.
duplicateEnabled Whether to enable the Duplicate operation in the Scene view context menu. If Duplicate is disabled, it is greyed out in the Scene view context menu.
deleteEnabled Whether to enable the Delete operation in the Scene view context menu. If Delete is disabled, it is greyed out in the Scene view context menu.

Description

Adds clipboard operations to the Scene view context menu.

By default, the Cut, Copy, Duplicate, and Delete operations are greyed out in the Scene view context menu if you do not have a GameObject selected in the Scene. The Paste operation is greyed out if the clipboard is empty. The method overload provides additional control over whether these operations are greyed out.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961