Version: Unity 6.3 Beta (6000.3)
Language : English
Combine meshes manually
Graphics performance and profiling in URP

Access properties in combined meshes

In the Built-in Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
, you can use a MaterialPropertyBlock to change material properties without breaking draw call batching. The CPU still needs to make some render-state changes, but using a MaterialPropertyBlock is faster than using multiple materials.

If your project uses a Scriptable Render Pipeline, don’t use a MaterialPropertyBlock because they remove SRP Batcher compatibility for the material. Use different materials for the different properties instead.

Warning: When you access shared material properties from a C# script, make sure to use Renderer.sharedMaterial and not Renderer.material. Renderer.material creates a copy of the material and assigns the copy back to the Renderer. This stops Unity from batching the draw calls for that Renderer.

Additional resources

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