|
Unity HDRP Product Visualizer 1.0.0
Interactive 3D product showcase built with Unity 6 and HDRP
|
Cycles through BackgroundPreset entries by writing to MaterialPropertyBlocks. More...


Public Member Functions | |
| void | NextPreset () |
| Advances to the next preset, wrapping around the list. | |
| void | SetPreset (int index) |
| Jumps directly to a preset by index. | |
Public Attributes | |
| List< BackgroundPreset > | presets = new() |
| Ordered list of available studio presets. | |
| System.Action< int, BackgroundPreset > | OnPresetChanged |
Fired after a preset change with (newIndex, newPreset). | |
References | |
| Renderer | backdropRenderer |
| Renderer of the large backdrop quad (uses GradientBackground shader). | |
| Renderer | groundRenderer |
| Renderer of the ground plane quad (uses HDRP/Lit). | |
Properties | |
| BackgroundPreset | CurrentPreset [get] |
The currently active BackgroundPreset, or null if the list is empty. | |
| int | CurrentIndex [get] |
| Zero-based index of the active preset. | |
| string | CurrentPresetName [get] |
| Display name of the active preset (empty string if none). | |
Cycles through BackgroundPreset entries by writing to MaterialPropertyBlocks.
Using MaterialPropertyBlock means the shared Material assets are never modified, so changes are not serialised to disk and do not break prefabs.
| # | Name | Mood |
|---|---|---|
| 0 | Dark Studio | Classic product render |
| 1 | Warm Amber | Cozy / sunset |
| 2 | Deep Space | Dark sci-fi |
| 3 | Emerald Night | Nature / energy drink |
Definition at line 52 of file BackgroundController.cs.
| void BackgroundController.NextPreset | ( | ) |
Advances to the next preset, wrapping around the list.
Definition at line 104 of file BackgroundController.cs.
References OnPresetChanged, and presets.
| void BackgroundController.SetPreset | ( | int | index | ) |
Jumps directly to a preset by index.
| index | Zero-based index into presets. Out-of-range values are ignored. |
Definition at line 113 of file BackgroundController.cs.
References OnPresetChanged, and presets.
| Renderer BackgroundController.backdropRenderer |
Renderer of the large backdrop quad (uses GradientBackground shader).
Definition at line 63 of file BackgroundController.cs.
| Renderer BackgroundController.groundRenderer |
Renderer of the ground plane quad (uses HDRP/Lit).
Definition at line 66 of file BackgroundController.cs.
| System.Action<int, BackgroundPreset> BackgroundController.OnPresetChanged |
Fired after a preset change with (newIndex, newPreset).
Definition at line 79 of file BackgroundController.cs.
Referenced by NextPreset(), and SetPreset().
| List<BackgroundPreset> BackgroundController.presets = new() |
Ordered list of available studio presets.
Definition at line 72 of file BackgroundController.cs.
Referenced by NextPreset(), and SetPreset().
|
get |
Zero-based index of the active preset.
Definition at line 125 of file BackgroundController.cs.
|
get |
The currently active BackgroundPreset, or null if the list is empty.
Definition at line 122 of file BackgroundController.cs.
|
get |
Display name of the active preset (empty string if none).
Definition at line 128 of file BackgroundController.cs.