Documentation

Unity Engine


Unity Engine


SetPickingMaterial(Material)

Set the material that Unity uses to render object picking data using the draw commands in the Scene view.
Read time 1 minuteLast updated a month ago

Definition

public void SetPickingMaterial(Material material)

Parameters

material

Unity Material.

Remarks

Note: This function does not prevent Unity from unloading this material when you switch scenes. To prevent this, ensure that
Material.hideFlags
contains the flags HideFlags.HideAndDontSave. Additional Resources: BatchCullingViewType.Picking, BatchCullingOutputDrawCommands.drawCommandPickingEntityIds