minigame-tuanjie-transform-sdk/Runtime/DisableKeyboardInput.cs
2025-09-12 11:02:02 +08:00

25 lines
601 B
C#

#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_PLAYABLEADS
PlayableAdsInput.mobileKeyboardSupport = false;
#elif PLATFORM_WEIXINMINIGAME
WeixinMiniGameInput.mobileKeyboardSupport = false;
#elif PLATFORM_WEBGL
#if UNITY_2022_1_OR_NEWER
WebGLInput.mobileKeyboardSupport = false;
#endif
#endif
#endif
}
}
#endif