Unity HDRP Product Visualizer 1.0.0
Interactive 3D product showcase built with Unity 6 and HDRP
Loading...
Searching...
No Matches
ProductVariant Class Reference

Serialisable PBR colour preset applied through MaterialPropertyBlock. More...

Public Attributes

string variantName = "Default"
 Human-readable name displayed in the UI (e.g. "Ocean Blue").
 
Color baseColor = Color.white
 Albedo colour mapped to the HDRP _BaseColor property.
 
Color emissiveColor = Color.black
 HDR emissive colour mapped to _EmissiveColor.
 
float metallic = 0.9f
 Metallic value in [0, 1] mapped to _Metallic.
 
float smoothness = 0.85f
 Smoothness (gloss) value in [0, 1] mapped to _Smoothness.
 

Detailed Description

Serialisable PBR colour preset applied through MaterialPropertyBlock.

No new Material asset is created per variant; instead the values are pushed directly to the GPU via Renderer.SetPropertyBlock, keeping the material list in the project clean and avoiding unnecessary asset duplication.

Definition at line 16 of file ProductVariantController.cs.

Member Data Documentation

◆ baseColor

Color ProductVariant.baseColor = Color.white

Albedo colour mapped to the HDRP _BaseColor property.

Definition at line 22 of file ProductVariantController.cs.

◆ emissiveColor

Color ProductVariant.emissiveColor = Color.black

HDR emissive colour mapped to _EmissiveColor.

Use the HDR picker (enabled by ColorUsage) to set intensity in nits. Leave black to disable emission.

Definition at line 28 of file ProductVariantController.cs.

◆ metallic

float ProductVariant.metallic = 0.9f

Metallic value in [0, 1] mapped to _Metallic.

Definition at line 31 of file ProductVariantController.cs.

◆ smoothness

float ProductVariant.smoothness = 0.85f

Smoothness (gloss) value in [0, 1] mapped to _Smoothness.

Definition at line 34 of file ProductVariantController.cs.

◆ variantName

string ProductVariant.variantName = "Default"

Human-readable name displayed in the UI (e.g. "Ocean Blue").

Definition at line 19 of file ProductVariantController.cs.


The documentation for this class was generated from the following file: