I'm trying to script InputFields in my Unity app. Here is the code for the same.
TMP_DefaultControls.Resources uiResources = new TMP_DefaultControls.Resources(); GameObject uiInputField = TMP_DefaultControls.CreateInputField(uiResources); uiInputField.name = "MyInput"; uiInputField.transform.SetParent(gameObject.transform);
This works fine and my field is created and works flawlessly. But the carat is missing. When I create an InputField through the editor, the carat is generated when the app runs, but not in this case. I scratched my head about it and I can not figure out why that does not work or how I can get it to work. Any suggestions? Thanks a lot!