mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2025-11-12 11:05:54 +08:00
25 lines
601 B
C#
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 |