fix capture desktop config not working; add config for turn off light effect

This commit is contained in:
xpeng
2022-10-07 14:20:01 +02:00
parent 0998fe4a9b
commit 92a1395c79
5 changed files with 55 additions and 45 deletions
@@ -28,7 +28,5 @@ public class CaptureSettingManager : MonoBehaviour
}
else
windowTexture.type = WindowTextureType.Window;
windowTexture.desktopIndex = ConfigManager.config.CaptureDesktopNumber;
}
}
@@ -203,6 +203,7 @@ public class ConfigManager : MonoBehaviour
void onBoolChanged(bool value)
{
config.CaptureDesktop = CaptureDesktopToggle.isOn;
config.useIPCLighting = isIPCLightingToggle.isOn;
config.useIPCTouch = isIPCTouchToggle.isOn;
onConfigChanged?.Invoke();
@@ -4,7 +4,7 @@ using UnityEngine;
public class LightSettingManager : MonoBehaviour
{
public List<GameObject> Lights;
public GameObject LightManager;
void Start()
{
ConfigManager.onConfigChanged += ApplyConfig;
@@ -13,9 +13,6 @@ public class LightSettingManager : MonoBehaviour
}
void ApplyConfig()
{
foreach (var light in Lights)
{
light.SetActive(ConfigManager.config.useLight);
}
LightManager.SetActive(ConfigManager.config.useLight);
}
}