Did I miss something or is there no proper way to create a basic graphics settings menu in HDRP?
Is that really it? Are we supposed to make a different asset for every setting permutation possible?
Is QualitySettings both deprecated and not deprecated at the same time?
masterTextureLimit works as a texture resolution limit but other things like lod bias or SetQualityLevel doesnt work?
How do I make a view distance slider? There are other things in the HDRP asset that need individual control.
Like the screen resolution percentage. It’s a slider.
Next up is DLSS and FSR. 2021.2 will apparently support both. Both of them have several quality levels.
In case someone else needs this and Unity doesn’t bother to fix this, here is how I do it manually.
I added this script next to every LOD group component I want to adjust.¨
public float[] originalLods = null;
[ContextMenu("Get True Lod Values")]
void SaveSettings()
{
LOD[] lods = GetComponent<LODGroup>().GetLODs();
originalLods = new float[lods.Length];
for (int i = 0; i < lods.Length; i++)
{
originalLods[i] = lods[i].screenRelativeTransitionHeight;
}
}
private void Awake()
{
SaveSettings();
GraphicsSettingsManager.settingsRefreshes += RefreshSettings;
}
void RefreshSettings()
{
if (originalLods == null)
return;
float lodMultiplier = GraphicsSettingsManager.GetLodLevelMultiplier();
LOD[] lods = GetComponent<LODGroup>().GetLODs();
for (int i = 0; i < lods.Length; i++)
{
lods[i].screenRelativeTransitionHeight = Mathf.Clamp01(originalLods[i] / lodMultiplier);
}
GetComponent<LODGroup>().SetLODs(lods);
}
I have my own GraphicsSettingsManager that does other graphical settings and calls all settingsRefreshes on Start and Settings changes.