A Unity workflow for authoring reusable ScriptableObject presets and applying them through MaterialPropertyBlock to keep visual variation while preserving batching.
Profiler summary from your test setup:
- MPB + different textures and properties on 5 cubes:
1batch call. - Different materials on 5 cubes:
5batch calls.
This tool separates visual tuning data from scene objects. You define color intensity, UV tiling/offset, and scale in a TuningPreset asset, then apply that preset to any renderer through TuningPresetApplier.
Because values are pushed through MaterialPropertyBlock instead of creating duplicated material instances, this setup helps reduce draw calls and improves render performance for repeated objects.
- Copy
Scripts/TuningPreset.csandScripts/TuningPresetApplier.csinto your Unity project. - Copy
Editor/TuningPresetApplierEditor.csinto anEditor/folder in your Unity project. - In Unity, create a preset via Create > Material Property Block > Tuning Preset.
- Add
TuningPresetApplierto a GameObject with aRenderer. - Assign the preset and click Apply in the custom inspector.
- Preset Authoring: Create reusable
TuningPresetassets from the Unity Create menu. - MPB-Based Rendering: Applies color and UV values using
MaterialPropertyBlock. - Transform Tuning: Applies per-preset local scale values.
- Custom Inspector Tools: One-click
Apply,Reset, andValidate Presetbuttons. - Edit Mode Support: Works in edit mode via
[ExecuteAlways]. - Data Safety:
OnValidate()clamps invalid intensity, UV tiling, and scale values.
TuningPreset: ScriptableObject containing color, intensity, metallic, tiling/offset, and scale tuning data.OnValidate(): Enforces safe ranges for intensity, UV tiling, and scale.
ApplyPreset(): Applies scale + MPB data (_BaseColor,_Tiling_and_Offset) to the renderer.ResetToDefault(): Clears property block and restores scale toVector3.one.
- Custom inspector with
Apply,Reset, andValidate Presetutilities.
This project is licensed under the MIT License - see the LICENSE file for details. Copyright (c) 2025 ARGUS

