Hi there! Bit new to unity so probably I know 10% of what I am doing atm
As you see in the attached I have 2 Input Fields.
- They are part of the SAME canvas (not sure if it’s part of the issue)
- The one on the left is a normal Input field, the one on the right is one I created with TextMesh Pro.
- The one on the left seems to always have focus correctly, the one on the right never gets it (when I click on it, nothing happens)
- The one on the left was from a tutorial code, the one on the right I created for a separate purpose. Ideally I want both of them to work independently, but ok switching from one to the other realistically is fine as well
After doing bit of searching I put the following script on the right-hand side input field but doesn’t really help:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class ActivateNotepad : MonoBehaviour
{
public void Activate(TMP_InputField notepad)
{
notepad.Select();
notepad.ActivateInputField();
}
}
and added the relevant GameObject to the OnSelect option of TextMeshPro input field.
Any idea how I can best design this situation?