Version: 2022.3

BatchRendererGroup.SetPickingMaterial

切换到手册
public void SetPickingMaterial (Material material);

参数

material Unity Material.

描述

Set the material that Unity uses to render object picking data using the draw commands in the Scene view.

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. See Also: BatchCullingViewType.Picking, BatchCullingOutputDrawCommands.drawCommandPickingInstanceIDs