Hello,
The error :
On the first computer test :
at bl_AllOptionsPro.ApplyResolution () [0x00013] in E:\Workplace\Unity\Projet\HoMBB\Assets\All Settings Pro\Content\Scripts\Core\bl_AllOptionsPro.cs:523
at bl_AllOptionsPro.LoadAndApply () [0x00236] in E:\Workplace\Unity\Projet\HoMBB\Assets\All Settings Pro\Content\Scripts\Core\bl_AllOptionsPro.cs:565
at bl_AllOptionsPro.Start () [0x0000c] in E:\Workplace\Unity\Projet\HoMBB\Assets\All Settings Pro\Content\Scripts\Core\bl_AllOptionsPro.cs:133
On the second computer test :
bl_AllOptionsPro:LoadAndApply() (at E:\Workplace\Unity\Projet\HoMBB\Assets\All Settings Pro\Content\Scripts\Core\bl_AllOptionsPro.cs:532)
bl_AllOptionsPro:Start() (at E:\Workplace\Unity\Projet\HoMBB\Assets\All Settings Pro\Content\Scripts\Core\bl_AllOptionsPro.cs:133)
Code is very long, I selected part with error.
Start :
void Start()
{
if (ApplyOnStart)
{
133 LoadAndApply();
}
ChangeWindow(StartWindow,false);
ChangeSelectionButton(PanelButtons[StartWindow]);
SettingsPanel.SetActive(false);
}
LoadAndApply function :
void LoadAndApply()
{
532 bl_Input.Instance.InitInput();
CurrentAA = PlayerPrefs.GetInt(AllOptionsKeyPro.AntiAliasing, DefaultAntiAliasing);
CurrentAS = PlayerPrefs.GetInt(AllOptionsKeyPro.AnisoTropic, DefaultAnisoTropic);
CurrentBW = PlayerPrefs.GetInt(AllOptionsKeyPro.BlendWeight, DefaultBlendWeight);
CurrentQuality = PlayerPrefs.GetInt(AllOptionsKeyPro.Quality, DefaultQuality);
CurrentRS = PlayerPrefs.GetInt(AllOptionsKeyPro.Resolution, DefaultResolution);
CurrentVSC = PlayerPrefs.GetInt(AllOptionsKeyPro.VsyncCount, DefaultVSync);
CurrentTL = PlayerPrefs.GetInt(AllOptionsKeyPro.TextureLimit, 0);
CurrentSC = PlayerPrefs.GetInt(AllOptionsKeyPro.ShadowCascade, 0);
_showFPS = (PlayerPrefs.GetInt(AllOptionsKeyPro.ShowFPS, 0) == 1) ? true : false;
_volumen = PlayerPrefs.GetFloat(AllOptionsKeyPro.Volumen, 1);
float sd = PlayerPrefs.GetFloat(AllOptionsKeyPro.ShadowDistance, DefaultShadowDistance);
shadowProjection = (PlayerPrefs.GetInt(AllOptionsKeyPro.ShadownProjection, 0) == 1) ? true : false;
PauseSound((PlayerPrefs.GetInt(AllOptionsKeyPro.PauseAudio,0) == 1 ? true : false));
useFullScreen = (PlayerPrefs.GetInt(AllOptionsKeyPro.ResolutionMode, 0) == 1) ? true : false;
_shadowEnable = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt(AllOptionsKeyPro.ShadowEnable));
_brightness = PlayerPrefs.GetFloat(AllOptionsKeyPro.Brightness, DefaultBrightness);
_realtimeReflection = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt(AllOptionsKeyPro.RealtimeReflection, 1));
_lodBias = PlayerPrefs.GetFloat(AllOptionsKeyPro.LodBias, DefaultLoadBias);
_hudScale = PlayerPrefs.GetFloat(AllOptionsKeyPro.HUDScale, _hudScale);
Debug.Log("Test_01");
SetBrightness(_brightness);
ShadowDistance(sd);
ShadowDistanceSlider.value = sd;
Volumen(_volumen);
VolumenSlider.value = _volumen;
ShadowProjectionType(shadowProjection);
SetShadowEnable(_shadowEnable);
SetRealTimeReflection(_realtimeReflection);
SetLodBias(_lodBias);
SetHUDScale(_hudScale);
565 ApplyResolution();
Debug.Log("Test_02");
QualitySettings.shadowCascades = ShadowCascadeOptions[CurrentSC];
ShadowCascadeText.text = ShadowCascadeNames[CurrentSC].ToUpper();
QualityText.text = QualitySettings.names[CurrentQuality].ToUpper();
QualitySettings.SetQualityLevel(CurrentQuality);
FullScreenOnText.text = (useFullScreen) ? "^MenuOption_on" : "^MenuOption_off";
ShowFPSText.text = (_showFPS) ? "^MenuOption_on" : "^MenuOption_off";
if (FPSObject != null) { foreach (GameObject g in FPSObject) { g.SetActive(_showFPS); } }
BrightnessSlider.value = _brightness;
LoadBiasSlider.value = _lodBias;
HUDScaleFactor.value = _hudScale;
switch (CurrentAS)
{
case 0:
QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
AnisotropicText.text = AnisotropicFiltering.Disable.ToString().ToUpper();
break;
case 1:
QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable;
AnisotropicText.text = AnisotropicFiltering.Enable.ToString().ToUpper();
break;
case 2:
QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable;
AnisotropicText.text = AnisotropicFiltering.ForceEnable.ToString().ToUpper();
break;
}
ApplyResolution:
public void ApplyResolution()
{
#if UNITY_EDITOR
Debug.Log("Resolution Settings just work on build.");
return;
#else
bool apply = (AutoApplyResolution) ? useFullScreen : false;
523 Screen.SetResolution(Screen.resolutions[CurrentRS].width, Screen.resolutions[CurrentRS].height, apply);
#endif
}
I added Test_01 and Test_02. I saw Test_01 on the first computer and I saw Test_01 and Test_02 on the second computer.