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

23 lines
552 B
C#
Raw Normal View History

2024-12-18 18:46:35 +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
2024-12-20 10:28:01 +08:00
#if UNITY_2022_1_OR_NEWER
WebGLInput.mobileKeyboardSupport = false;
#endif
2024-12-18 18:46:35 +08:00
#endif
#endif
}
}
#endif