I know this has been asked a few hundred times, but unfortunately the answers seem to be deprecated now.
What i’m looking for is fairly simple, I have a label display the name of an object. In the game said object is re-nameable, so clicking on the label will change it to a textfield. But I want the user to be able to press enter (return) to leave the textfield, currently you can only do this by clicking off the textfield.
I have seen references to eatkeypressInTextField or some such thing, but it is deprecated now, and unity doesn’t even seem to recognize it.
How can i make it so that either pressing enter OR clicking off the textfield will take focus away from the textfield. (I will then change it from a textfield back to a label to make it clear).