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

25 lines
601 B
C#
Raw Permalink 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
2025-11-06 11:21:09 +08:00
#if PLATFORM_PLAYABLEADS
PlayableAdsInput.mobileKeyboardSupport = false;
#elif PLATFORM_WEIXINMINIGAME
2024-12-18 18:46:35 +08:00
WeixinMiniGameInput.mobileKeyboardSupport = false;
2025-03-17 19:23:46 +08:00
#elif PLATFORM_WEBGL
#if UNITY_2022_1_OR_NEWER
2025-05-07 11:36:22 +08:00
WebGLInput.mobileKeyboardSupport = false;
2025-03-17 19:23:46 +08:00
#endif
#endif
#endif
2024-12-18 18:46:35 +08:00
}
}
#endif