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 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public void SetPickingMaterial(Material material)
Parameters
Unity Material.
Remarks
Note: This function does not prevent Unity from unloading this material when you switch scenes. To prevent this, ensure that contains the flags HideFlags.HideAndDontSave. Additional Resources: BatchCullingViewType.Picking, BatchCullingOutputDrawCommands.drawCommandPickingEntityIds
Material.hideFlags