Esempio n. 1
0
    private bool Init()
    {
        sceneConfigPath = Application.dataPath + "/" + sceneConfigPath;
        Scene curScene = SceneManager.GetActiveScene();

        if (curScene == null)
        {
            window.Close();
            window = null;
            UnityEditor.EditorUtility.DisplayDialog("Title", "请先打开场景", "是");
            return(false);
        }
        m_sceneName = curScene.name;

        LoadGroups();

        string configPath = SceneTools.getConfigPath();

        try
        {
            baseItemsData.Clear();
            System.Reflection.PropertyInfo[] proInfo;
            ConfHelper.LoadFromExcel <BaseItem>(configPath + "exhibit.xlsx", 0, out baseItemsData, out proInfo);
        }
        catch (IOException ex)
        {
            window.Close();
            window = null;
            UnityEditor.EditorUtility.DisplayDialog("Title", "先关表!!!", "是");
            return(false);
        }
        return(true);
    }