Page 1 of 1

Variable and TextInput issue

Posted: Mon Sep 23, 2019 1:57 am
by KakimaAkuma
I have this weird bug where I'm changing one variable using User Input and it affects another variable instead.

Block1
TextInput(Text Field UI, Test-1, Test1);
*Inputs "Kakima"

Block2
Dialogue: Your input is [lua(Actor["MainPlayer"].Test1)]
Script: Actor["MainPlayer"].Test1= Variable["Test1"]

Expected Output: Your input is Kakima
Current Output: Your input is

Block3
TextInput(Text Field UI, Test-2, Test2);
~Kakima appears in input field instead of Test-2
*Inputs AAAAA

Block4
Dialogue: Your input is [lua(Actor["MainPlayer"].Test2)]
Script: Actor["MainPlayer"].Test1= Variable["Test1"]

Expected Output: Your input is AAAAA
Current Output: Your input is

Re: Variable and TextInput issue

Posted: Mon Sep 23, 2019 9:51 am
by Tony Li
Your setup looks correct to me. Here's an example (exported from Unity 2018.1) that works. Would you please compare it to your example? Maybe you'll see a difference that is causing the issue.

TextInputExample_2019-09-23.unitypackage

If that doesn't help, please feel free to send a reproduction example to tony (at) pixelcrushers.com. I'll be happy to take a look.

Re: Variable and TextInput issue

Posted: Mon Sep 23, 2019 9:30 pm
by KakimaAkuma
Sent test package

Re: Variable and TextInput issue

Posted: Mon Sep 23, 2019 10:09 pm
by Tony Li
Thanks for sending the package. The Input Field was unassigned. If you assign InputField (TMP), it should work correctly:
textFieldUITMP.png
textFieldUITMP.png (87.95 KiB) Viewed 642 times

Re: Variable and TextInput issue

Posted: Mon Sep 23, 2019 10:57 pm
by KakimaAkuma
Turns out the Text Pro UI Input field went missing. I just replaced it with a non text mesh pro one.

Re: Variable and TextInput issue

Posted: Tue Sep 24, 2019 9:03 am
by Tony Li
Hmm, if you want to go back to TMPro, make sure your Scripting Define Symbols includes TMP_PRESENT. One way to add this is to select menu item Tools > Pixel Crushers > Dialogue System > Welcome Window and click the TextMesh Pro Support checkbox. Then if you unassign the Unity UI version of the Input Field, it should show unassigned versions for Unity UI and TMPro.