ドキュメント

Unity Engine

Unity Engine

DropDown

Displays the menu at the specified position.
読み終わるまでの所要時間 2 分最終更新 20日前

Definition

Displays the menu at the specified position.
注意
Deprecated. This version of Dropdown is deprecated. To ensure the dropdown is positioned correctly, please provide a reference to the targetElement.
public void DropDown(Rect position)

Parameters

position

The position in the coordinate space of the panel.

Remarks

The parent element that displays the menu:
The
dropdownMenuSizeMode
parameter determines the width of the menu.
Displays the menu at the specified position.
注意
Deprecated. This version of Dropdown is deprecated. Please use DropDown(Rect position, VisualElement targetElement, DropdownMenuSizeMode dropdownMenuSizeMode).
public void DropDown(Rect position, VisualElement targetElement, bool anchored = false)

Parameters

position

The position in the coordinate space of the panel.

targetElement

The element determines which root to use as the menu's parent.

anchored

Remarks

The parent element that displays the menu:
The
dropdownMenuSizeMode
parameter determines the width of the menu.
Displays the menu at the specified position.
注意
Deprecated. This version of Dropdown is deprecated. Please use DropDown(Rect position, VisualElement targetElement, DropdownMenuSizeMode dropdownMenuSizeMode).
public void DropDown(Rect position, VisualElement targetElement, bool anchored = false, bool fitContentWidthIfAnchored = false)

Parameters

position

The position in the coordinate space of the panel.

targetElement

The element determines which root to use as the menu's parent.

anchored


fitContentWidthIfAnchored

Remarks

The parent element that displays the menu:
The
dropdownMenuSizeMode
parameter determines the width of the menu.
Displays the menu at the specified position.
public override void DropDown(Rect position, VisualElement targetElement, DropdownMenuSizeMode dropdownMenuSizeMode = DropdownMenuSizeMode.Auto)

Parameters

position

The position in the coordinate space of the panel.

targetElement

The element determines which root to use as the menu's parent.

dropdownMenuSizeMode

Indicates how to format the menu. Refer to DropdownMenuSizeMode for more information. Defaults to Auto.

Remarks

The parent element that displays the menu:
The
dropdownMenuSizeMode
parameter determines the width of the menu.