- Home /
EditorGUILayoutTextField Problem
Hi, I am trying to get the string data of the EEditorGUILayout.TextField() function where the text data will be written by user.
levelPath = "C:\\Levels\\Level003.txt";
levelPath = EditorGUILayout.TextField(levelPath);
I don't want this feature as it is an inaccurate method to get the file path...
Does UnityEditor has a feature to get the filePath by Opening the file browser? I've looked at all the EditorGUILayout and it doesn't seems to be supported or may be I am wrong...
Answer by Thet Naing Swe · Nov 18, 2010 at 06:53 AM
Hi.. I reslve my own problem.. To Open the file dialogue windows, you don't need external plugins as the below code just works for me..
EditorUtility.OpenFilePanel("Select The Level File", "", "txt");
Answer by denewbie · Nov 16, 2010 at 10:46 AM
I don't think unity can open up a dialog box but you're free to use C# IO system libraries to build your own dialog box. Its a bit of work but if you want to use it often it might be a good idea to build it. I build my own 2D and 3D components like list boxes and 3D scroll bars and such.
Thanks.... Can u give me a tutorial of how to start or are u willing to share some simple code?