OpenFile() public method

public OpenFile ( String mainFolder ) : void
mainFolder String
return void
Esempio n. 1
0
 private void GUIFile()
 {
     if (bShowFileButton == false)
     {
         if (GUILayout.Button("[+]File", skin.customStyles[1]))
         {
             bShowFileButton = true;
         }
     }
     else
     {
         if (GUILayout.Button("[-]File", skin.customStyles[1]))
         {
             bShowFileButton = false;
         }
     }
     if (bShowFileButton)
     {
         //GUILayout.BeginVertical(skin.customStyles[0]);
         GUILayout.BeginHorizontal();
         if (GUILayout.Button("New"))
         {
             curPath = "";
             viewer.Clear();
         }
         if (GUILayout.Button("Load"))
         {
             browser.OpenFile(Application.persistentDataPath, LoadModel);
         }
         GUILayout.EndHorizontal();
         GUILayout.BeginHorizontal();
         if (GUILayout.Button("Save"))
         {
             if (curPath != "")
             {
                 SaveModel(curPath);
             }
             else
             {
                 browser.SaveFile(Application.persistentDataPath, Application.persistentDataPath, SaveModel);
             }
         }
         if (GUILayout.Button("Save As"))
         {
             browser.SaveFile(Application.persistentDataPath, Application.persistentDataPath, SaveModel);
         }
         GUILayout.EndHorizontal();
         //GUILayout.BeginVertical();
     }
 }