|
|
|
|
|
|
{ |
|
|
|
[SerializeField] private float _lightmapScale = 1f; |
|
|
|
|
|
|
|
// Called when the Lightmap Scale field is changed in the component editor
|
|
|
|
private void OnValidate() |
|
|
|
#if UNITY_EDITOR
|
|
|
|
// Called when the Lightmap Scale field is changed in the component editor
|
|
|
|
private void OnValidate() |
|
|
|
{ |
|
|
|
// Clamp the lightmap scale to the range [0,1]
|
|
|
|
if (_lightmapScale < 0f) |
|
|
|
|
|
|
meshRenderer.scaleInLightmap = _lightmapScale; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif
|
|
|
|
} |