修复vr适配bug

This commit is contained in:
shenjianxing 2025-03-31 16:47:41 +08:00
parent 5105a9b9ab
commit 4b38a930f6
3 changed files with 4 additions and 3 deletions

View File

@ -1032,7 +1032,7 @@ Canvas:
m_OverridePixelPerfect: 0 m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0 m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0 m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0 m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0 m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingOrder: 0 m_SortingOrder: 0

View File

@ -16,6 +16,7 @@ public class DeviceItem : MonoBehaviour
public void Init(XMLTool.Device device) public void Init(XMLTool.Device device)
{ {
this.device = device; this.device = device;
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuitEvent);
if (string.IsNullOrEmpty(device.HighColor) == false) if (string.IsNullOrEmpty(device.HighColor) == false)
{ {
var effect = gameObject.GetOrAddComponent<HighlightEffect>(); var effect = gameObject.GetOrAddComponent<HighlightEffect>();
@ -24,7 +25,6 @@ public class DeviceItem : MonoBehaviour
effect.outlineColor = Utility.ToColor(device.HighColor); effect.outlineColor = Utility.ToColor(device.HighColor);
StringEventSystem.Global.Register<string[]>(Global.HighLightTrigger, OnHighLightTriggerEvent); StringEventSystem.Global.Register<string[]>(Global.HighLightTrigger, OnHighLightTriggerEvent);
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged); TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
TypeEventSystem.Global.Register<OnModuleQuit>(OnModuleQuitEvent);
#if VR #if VR
effect.constantWidth = false; effect.constantWidth = false;

View File

@ -2,6 +2,7 @@ using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using QFramework; using QFramework;
using System.Data.Common; using System.Data.Common;
using UnityEngine.SceneManagement;
namespace QFramework.Example namespace QFramework.Example
{ {
@ -93,7 +94,7 @@ namespace QFramework.Example
txt = "ÊÇ", txt = "ÊÇ",
OnClick = () => OnClick = () =>
{ {
Hide(); Hide();
TypeEventSystem.Global.Send<OnModuleQuit>(); TypeEventSystem.Global.Send<OnModuleQuit>();
UIKit.OpenPanelAsync<UIModeSelect>().ToAction().StartGlobal(); UIKit.OpenPanelAsync<UIModeSelect>().ToAction().StartGlobal();
} }