So! I'd like to be able to create a menu system that pops up with a math question for kids (after clicking on a hotspot), where the kid can read the question, then type in their answer in a UI input field, have the computer check it (against the predetermined answer(s)) and then receive a "correct" or "incorrect" to their typed response.
I've gotten close by using a modified journal system to log the questions, but I'm having trouble figuring out how to "read" the string from the input field to turn out "correct" or "incorrect". Any suggestions?
Comments
Now my question is how to incorporate swap-outable images into this kind of menu?
There's a few ways to achieve this:
1) The "Graphic" menu element type can be used to store an image texture within a menu, so if you create a separate Graphic element for each image type (and position them all in the same spot), you can use the Menu: Change state Action to hide all except one. ActionList parameters would be useful here, since you can define a string parameter to create a single ActionList that hides all such elements and then shows one referenced in the parameter.
2) A single "Graphic" element's texture can be changed at runtime through script. Right-clicking the field's label in the Menu Manager (as with any Manager field) will give you an API reference to amend its value in script. Such a script can be placed in a custom Action.
3) If your Menu is rendered with Unity UI, and images are displayed in UI Image components, then you can attach an Animator to the same GameObject to change the image texture via animation. AC's Object: Animate Action can then be used to control which animation is played (and hence which image texture is displayed). A tutorial on linking AC with Unity UI can be found here.