public SceneExportCollection(IAssetExporter assetExporter, string name, IEnumerable <Object> objects)
        {
            if (assetExporter == null)
            {
                throw new ArgumentNullException(nameof(assetExporter));
            }
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            AssetExporter = assetExporter;
            Name          = name;

            HashSet <string> exportIDs = new HashSet <string>();

            foreach (Object @object in objects.OrderBy(t => t, this))
            {
                AddObject(@object, exportIDs);
            }

            if (Config.IsGenerateGUIDByContent)
            {
                GUID = ObjectUtils.CalculateObjectsGUID(objects);
            }
            else
            {
                GUID = new UtinyGUID(new Guid());
            }
        }
        public SceneExportCollection(IAssetExporter assetExporter, ISerializedFile file)
        {
            if (assetExporter == null)
            {
                throw new ArgumentNullException(nameof(assetExporter));
            }
            if (file == null)
            {
                throw new ArgumentNullException(nameof(file));
            }

            AssetExporter = assetExporter;
            Name          = file.Name;
            m_file        = file;

            foreach (Object asset in file.FetchAssets())
            {
                if (OcclusionCullingSettings.IsCompatible(asset))
                {
                    AddComponent(file, asset);
                }
            }
            m_cexportIDs = m_cexportIDs.OrderBy(t => t.Key, this).ToDictionary(t => t.Key, t => t.Value);

            if (OcclusionCullingSettings.IsReadSceneGUID(file.Version))
            {
                OcclusionCullingSettings sceneSettings = Components.Where(t => t.ClassID == ClassIDType.OcclusionCullingSettings).Select(t => (OcclusionCullingSettings)t).FirstOrDefault();
                if (sceneSettings == null)
                {
                    GUID = new EngineGUID(Guid.NewGuid());
                }
                else
                {
                    GUID = sceneSettings.SceneGUID;
                }
            }
            else
            {
                if (Config.IsGenerateGUIDByContent)
                {
                    GUID = ObjectUtils.CalculateObjectsGUID(Assets);
                }
                else
                {
                    GUID = new EngineGUID(Guid.NewGuid());
                }
            }
        }