I am developing application of XboxOne and Win10 in UWP.
・Unity 2017.2.1p3
・script backend : IL2CPP
・Build Type : D3D
So we need On-Screen Keyboard on XboxOne.
However it does not seem to work with UWP add-on(?) as it is in the following thread:
(UnityEngine.TouchScreenKeyboard)
So I am making plugin with C++/CX.
The goal is the same behavior as the TextSystem Plugin developed by XboxOne using XDK.
(On-Screen Keyboard + Entry Fiedl(TextBox?) + list of suggestions)
My strategy is to add a TextBox created with new to the current content (View? Page?).
And focus on TextBox, On-Screen Keyboard will automatically appear.
but have trouble.
In the case of non-XAML and C ++, I do not know how to dynamically add TextBox.
(In the case of XAML, information to be added to StackPanel etc. can be found)
Please tell me how to add TextBox dynamically or a better solution!
Yes, I tried it.
And it was as reported in the link.
(It does not work properly)
Cancelling the keyboard with the “B” button is completely not recognized by Unity. The keyboard disappears, and no other controller input is accepted; but the TouchScreenKeyboard instance, and the static variables, are all unchanged when this happens, so there’s no way to detect this state. (Tried the “visible”, “active”, “done”, “status”, and “wasCanceled” flags, to no success.)
↑
Dec 18, 2017
Report
The Unity person at the linked site says the same thing as you, but the bug has not been fixed and we have no waiting time.
(Do you consider combining IL2CPP script backend and BuildType D3D?)
Oh…, maybe the version of .NET may also be involved.
Scripting Runtime Version : Experimental (.NET 4.6 Equivalemt)
Api Compatibility Level : .NET 4.6
But they are not important, they do not work in reality so they need to be replaced!
Is there any other way to avoid C ++ / CX programming?
We are creating on Unity’s Universal Windows platform.(
(Do not use XDK)
But the runtime environment is XboxOne.
Should this problem(issue?) be posted to a thread on XboxOne (other platform)?
But the first question has not been solved.
The problem with UnityEngine.TouchScreenKeyboard is a bug in Unity.
Why does the Unity person not seriously deal with this problem?
Unity 2017.2.1p3
Universal Windows platform
Script backend : IL2CPP
Build Type : D3D
runtime : XboxOne
↑
Using UnityEngine.TouchScreenKeyboard is not a proper solution.
(Do not work)
Return to the first question.
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
// I want to add a TextBox to the current screen
auto textBox = new TextBox();
/*
I looked up to the following, but I do not know the future.
Or is there a different approach?
auto rootFrame = dynamic_castControls::Frame^(Window::Current->Content);
if (rootFrame != nullptr) {
auto pageType = rootFrame->SourcePageType;
// I do not know what to do from now on…
}
*/
If you are using D3D build type, I recommend you to use CoreTextEdit framework for opening touch keyboard, not XAML controls.
Thank you!
I was hoping for this expansion.
But I already use CoreTextEditContext.
Our goal is to make it the same as the InputPane appearing on the XboxOne XDK plugin.
There is a TextBox in which the text entered appears and the appearance of input prediction appears.
We believe CoreTextEditContext alone, it will not happen.
Please advise or tell me how to make it!