Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"GetNameOfFocusedControl" not working?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Flynn, Aug 29, 2009.

  1. Flynn


    May 24, 2009
    My target is pretty simple, put the name of the selected text box into a string!

    The only problem is when I try:

    Code (csharp):
    1. var test = "";
    2. test = GUI.GetNameOfFocusedControl ();
    I get the following error:

    BCE0019: 'GetNameOfFocusedControl' is not a member of 'UnityEngine.GUI'.

    I've tried the forum search with no luck...

    I have a bad feeling that this is because I have an older version of Unity...

    If it it due to the fact that I have an older version, is there any way I can substitute this function?
  2. jmunozar


    Jun 23, 2008
    What version of Unity you have?

    Check out the documentation you have (the one that comes with your version) and check if there is a function.