Let's say we have a scene in Unity with canvas and InputField on it. Is there a way i can reference my InputField inside native plugin? Maybe i can pass it from Unity?
\$\begingroup\$
\$\endgroup\$
4
-
\$\begingroup\$ What would your native plugin like to do with that InputField, specifically? There may be ways to expose that functionality, even if it's not exactly passing a reference. \$\endgroup\$– DMGregory ♦Commented Jul 16, 2019 at 23:37
-
\$\begingroup\$ I know for a fact that i can reference current Unity activity inside plugin. I can get it in Unity and pass it as a method parameter: new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity"). I also know that activity contains all UI components that is currently on screen. The reason i need to get InputField inside native code so that i could open soft-keyboard with parameters SHOW_FORCED or SHOW_IMPLICIT. \$\endgroup\$– eXiz7Commented Jul 17, 2019 at 9:02
-
\$\begingroup\$ For detailed reasoning why i would whant that, you can read yesterdays thread: gamedev.stackexchange.com/questions/173795/… \$\endgroup\$– eXiz7Commented Jul 17, 2019 at 9:03
-
\$\begingroup\$ If your end goal is still to control the keyboard, then your original question captures that end goal better. I'd recommend deleting this one to focus attention on solutions to your original. \$\endgroup\$– DMGregory ♦Commented Jul 17, 2019 at 11:33
Add a comment
|