Version: 2021.3
LanguageEnglish
  • C#

HandleUtility.PickGameObjectCallback

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 delegate GameObject PickGameObjectCallback(Camera cam, int layers, Vector2 position, GameObject[] ignore, GameObject[] filter, out int materialIndex);

Parameters

cam The camera with which to render pickable objects.
layers A layer mask specifying what layers to consider valid for picking. See also Camera.cullingMask.
position A position in GUI coordinates. The top-left of the window is (0,0), and the bottom-right is (Screen.width, Screen.height).
ignore An array of GameObjects that will not be considered when selecting the nearest GameObject.
filter An array of GameObjects that will be tested for picking intersection. If this argument is not null, only GameObjects in the filter array will be selected.
materialIndex Returns the index of the Renderer component in the material array that is closest to the specified position. If the picked object does not contain a MeshRenderer, or the picking intersection does not fall within a mesh boundary, this returns -1.

Description

This is the method definition for pickGameObjectCustomPasses.

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