修复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_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0

View File

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

View File

@ -2,6 +2,7 @@ using UnityEngine;
using UnityEngine.UI;
using QFramework;
using System.Data.Common;
using UnityEngine.SceneManagement;
namespace QFramework.Example
{