WebGLInput
IME for Unity WebGL ( Support TextMesh Pro from Unity2018.2 )
support “copy and paste”
support “tab” and “shift+tab” change focus to other InputField
support mobile. (Experiment)
support UI Toolkit. (Experiment) (Support from Unity2022)
DEMO
Build with Unity’s WebGL Template ( Unity2023.2.2f1 )
How to use
1.download WebGLSupport.unitypackage and import to project
2.add “WebGLInput” Component to InputField GameObject
3.build and run!!
no need to setting anything.
insert \t use tab key instead of changing focus
Add “WEBGLINPUT_TAB” to Scripting Define Symbols.
and check “Enable Tab Text” at WebGLInput.
fullscreen support
Call
WebGLSupport.WebGLWindow.SwitchFullscreen();
to switch fullscreen mode.
Experimental : Support UI Toolkit
sample code
[SerializeField] UIDocument uiDocument;
public void Start()
{
// find all TextField element
uiDocument.rootVisualElement.Query<TextField>().ForEach(v =>
{
// add WebGLInputManipulator to TextField
v.AddManipulator(new WebGLSupport.WebGLInputManipulator());
});
}
© 版权声明
免责声明:本站所有资源由用户自发上传,仅供学习交流,如有侵犯您的权益,请联系站长删除;
All resources on this site are free and are only for learning and exchange. If any of them infringe upon your rights and interests, please contact the webmaster for deletion
THE END
暂无评论内容