Пример #1
0
        public void LoadXnd(out bool hasRedirectionType)
        {
            hasRedirectionType = false;

            Hash64 hash    = GetFolderHash();
            var    address = ClassName.GetDirectory() + hash.ToString().ToLower() + "/";
            var    files   = CEngine.Instance.FileManager.GetFiles(address, "*.metadata");

            if (files == null || files.Count == 0)
            {
                Profiler.Log.WriteLine(Profiler.ELogTag.Warning, "MetaData", $"MetaClass {address} is empty");
            }

            foreach (var i in files)
            {
                var MetaHash = CEngine.Instance.FileManager.GetPureFileFromFullName(i, false);
                var meta     = new MetaData(i);
                this.Metas[System.Convert.ToUInt32(MetaHash)] = meta;

                if (CIPlatform.Instance.PlayMode != CIPlatform.enPlayMode.Game)
                {
                    bool isRedirection = false;
                    meta.LoadMetaData(i, out isRedirection);
                    System.Diagnostics.Debug.Assert(MetaHash == meta.MetaHash.ToString());
                    if (isRedirection)
                    {
                        hasRedirectionType = true;
                    }
                }
            }
        }