- Home /
Question by
Levix · Apr 03, 2013 at 03:45 PM ·
guiargumentexceptionrepaint
Improved File Browser, Repaint issue
Hi, I am trying to load some files during the Runtime. Therefore, i used the ImprovedFileBrowser from the wiki (http://wiki.unity3d.com/index.php/ImprovedFileBrowser).
It works very fine with the example, but when i try to display the by pressing on a 3D text instead of the GUI-Button from the example, i get an error:
ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
Here the code i am using:
if (load)
{
GUI.skin = skin;
if (m_fileBrowser != null)
{
m_fileBrowser.OnGUI();
}
else
{
m_fileBrowser = new FileBrowser(
new Rect(100, 100, 600, 500),
"Choose File",
FileSelectedCallback
);
}
}
If i am using the OnGUIMain() function from the example, everything is fine.
thanks for your help
Comment