minigame-tuanjie-transform-sdk/Runtime/DisableKeyboardInput.cs

23 lines
518 B
C#
Raw Normal View History

2025-02-11 15:27:19 +08:00
#if UNITY_WEBGL || WEIXINMINIGAME || UNITY_EDITOR
using System;
using UnityEngine;
using WeChatWASM;
internal class DisableKeyboardInput : MonoBehaviour
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void OnGameLaunch()
{
#if !UNITY_EDITOR
#if PLATFORM_WEIXINMINIGAME
WeixinMiniGameInput.mobileKeyboardSupport = false;
#elif PLATFORM_WEBGL
#if UNITY_2022_1_OR_NEWER
2025-04-15 11:51:00 +08:00
WebGLInput.mobileKeyboardSupport = false;
2025-02-11 15:27:19 +08:00
#endif
#endif
#endif
}
}
#endif