文档

Unity Engine

Unity Engine

pickingIndex

Specifies the picking index value that the first pickable object uses to write to the picking render texture.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public int pickingIndex { get; }

Remarks

The picking index must be encoded to a Vector4
selectionId
value that uses HandleUtility.EncodeSelectionId, and output from the shader. If you are rendering more than one pickable object in the callback, increment the
pickingIndex
for every additional object.
Additional Resources: HandleUtility.EncodeSelectionId.