Exemplo n.º 1
0
 private static void SelectFile(string path)
 {
     if (null != BehaviorManager.behaviorSelectFile)
     {
         string fileName = BehaviorManager.behaviorSelectFile();
         if (null != BehaviorManager.behaviorLoadFile)
         {
             BehaviorManager.behaviorLoadFile(fileName);
         }
     }
 }
Exemplo n.º 2
0
        private static void SelectFile(string path)
        {
            if (!System.IO.Directory.Exists(path))
            {
                System.IO.Directory.CreateDirectory(path);
            }
            GUILayout.Space(8);

            string filePath = EditorUtility.OpenFilePanel("选择技能ID文件", path, "bytes");

            if (!string.IsNullOrEmpty(filePath))
            {
                string fileName = System.IO.Path.GetFileNameWithoutExtension(filePath);
                if (!string.IsNullOrEmpty(fileName))
                {
                    if (null != BehaviorManager.behaviorLoadFile)
                    {
                        BehaviorManager.behaviorLoadFile(fileName);
                    }
                }
            }
        }