|
|
|
|
|
|
|
|
|
|
[ExecuteInEditMode] |
|
|
|
public class LightmappedLOD : MonoBehaviour { |
|
|
|
//public int LODIndex = 1;
|
|
|
|
|
|
|
|
// Use this for initialization
|
|
|
|
private void Awake() |
|
|
|
{ |
|
|
|
currentRenderer = gameObject.GetComponent<MeshRenderer>(); |
|
|
|
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
renderers[i].lightProbeUsage = UnityEngine.Rendering.LightProbeUsage.Off; |
|
|
|
renderers[i].lightProbeUsage = lods[0].renderers[i].lightProbeUsage; |
|
|
|
renderers[i].lightmapIndex = lods[0].renderers[i].lightmapIndex; |
|
|
|
renderers[i].lightmapScaleOffset = lods[0].renderers[i].lightmapScaleOffset; |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |