Version: 2023.2
public bool IsPickingDisabled (GameObject gameObject, bool includeDescendants);

参数

gameObject 要检查的 GameObject。
includeDescendants 指定 true 可检查 GameObject 及其所有后代。设置为 false 可检查 GameObject。

返回

bool 当 includeDescendants 为 true 时,在已禁用 GameObject 及其所有后代的选取时,此方法返回 true。当 includeDescendants 为 false 时,在已禁用 GameObject 的选取时,此方法返回 true。

描述

检查 GameObject 的选取状态,以及可选择检查其后代。

当 includeDescendants 为 true 时,在已禁用 GameObject 及其所有后代的选取时,此方法返回 true。当 includeDescendants 为 false 时,在隐藏 GameObject 时,此方法返回 true。