Ejemplo n.º 1
0
        //////////////////////////////////////////////////////////////////////////////

        public bool Load()
        {
            lock (this)
            {
                try
                {
                    if (m_path == null)
                    {
                        CLog.e("Can't load settings: path is null");
                        return(false);
                    }

                    if (CFileUtils.FileExists(m_path))
                    {
                        m_data = CPlist.readPlist(m_path) as Dictionary <string, object>;
                        return(true);
                    }
                }
                catch (Exception e)
                {
                    CLog.error(e, "Can't read settings: {0}", m_path);
                }

                m_data = new Dictionary <string, object>();
                return(false);
            }
        }
Ejemplo n.º 2
0
        public static bool AssetPathExists(string path)
        {
            string fullPath = Path.Combine(LunarEditor.CEditor.ProjectPath, path);

            return(CFileUtils.FileExists(fullPath));
        }
Ejemplo n.º 3
0
 public static bool PathExists(string path)
 {
     return(path != null && Path.IsPathRooted(path) ? CFileUtils.FileExists(path) : AssetPathExists(path));
 }