Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

RenderPickingArgs.NeedToRenderForPicking

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 bool NeedToRenderForPicking(GameObject go);

Parameters

go The GameObject to test.

Returns

bool True if the GameObject should be rendered.

Description

Checks whether a GameObject should be rendered in the current render picking callback.

RenderPickingArgs.NeedToRenderForPicking is similar to RenderObjectSetContains. This method checks whether a GameObject should be rendered or not.

If the current renderPickingType is RenderPickingType.RenderFromIgnoreSet, this method returns true if the given go is not contained in the ignore set. Otherwise, this method returns true if the given go is contained in the filter set.

Notice that for the RenderPickingType.RenderFromIgnoreSet type, this method returns true for all GameObjects if it is not contained in the ignore set. However, you are only required to handle the rendering of the custom geometries your callback is set to render.