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
Variable and TextInput issue
Re: Variable and TextInput issue
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.
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.
-
- Posts: 29
- Joined: Mon Sep 09, 2019 9:51 pm
Re: Variable and TextInput issue
Sent test package
Re: Variable and TextInput issue
Thanks for sending the package. The Input Field was unassigned. If you assign InputField (TMP), it should work correctly:
-
- Posts: 29
- Joined: Mon Sep 09, 2019 9:51 pm
Re: Variable and TextInput issue
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
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.