public MetaPtr(long fileID, UnityGUID guid, AssetType assetType) { FileID = fileID; GUID = guid; AssetType = assetType; UseThunderId = false; }
public override MetaPtr CreateExportPointer(Object asset, bool isLocal) { if (isLocal) { throw new NotSupportedException(); } MonoScript script = m_scripts[asset]; if (!MonoScript.HasAssemblyName(script.File.Version, script.File.Flags) || s_unityEngine.IsMatch(script.AssemblyName)) { if (MonoScript.HasNamespace(script.File.Version)) { int fileID = Compute(script.Namespace, script.ClassName); return(new MetaPtr(fileID, UnityEngineGUID, AssetExporter.ToExportType(asset))); } else { ScriptIdentifier scriptInfo = script.GetScriptID(); if (!scriptInfo.IsDefault) { int fileID = Compute(scriptInfo.Namespace, scriptInfo.Name); return(new MetaPtr(fileID, UnityEngineGUID, AssetExporter.ToExportType(asset))); } } } long exportID = GetExportID(asset); UnityGUID uniqueGUID = script.GUID; return(new MetaPtr(exportID, uniqueGUID, AssetExporter.ToExportType(asset))); }
public OcclusionScene(UnityGUID scene, int renderSize, int portalSize) { Scene = scene; IndexRenderers = 0; SizeRenderers = renderSize; IndexPortals = 0; SizePortals = portalSize; }
public SceneExportCollection(IAssetExporter assetExporter, VirtualSerializedFile virtualFile, 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; List <Object> components = new List <Object>(); foreach (Object asset in file.FetchAssets()) { if (OcclusionCullingSettings.IsSceneCompatible(asset)) { components.Add(asset); m_cexportIDs.Add(asset.AssetInfo, asset.PathID); } } m_components = components.OrderBy(t => t, this).ToArray(); if (OcclusionCullingSettings.HasSceneGUID(file.Version)) { OcclusionCullingSettings sceneSettings = Components.Where(t => t.ClassID == ClassIDType.OcclusionCullingSettings).Select(t => (OcclusionCullingSettings)t).FirstOrDefault(); if (sceneSettings != null) { GUID = sceneSettings.SceneGUID; } } if (GUID.IsZero) { GUID = new UnityGUID(Guid.NewGuid()); } if (OcclusionCullingSettings.HasReadPVSData(File.Version)) { foreach (Object comp in Components) { if (comp.ClassID == ClassIDType.OcclusionCullingSettings) { OcclusionCullingSettings settings = (OcclusionCullingSettings)comp; if (settings.PVSData.Length > 0) { m_occlusionCullingSettings = settings; OcclusionCullingData = OcclusionCullingData.CreateVirtualInstance(virtualFile); break; } } } } }
public ExportPointer(string fileID, UnityGUID guid, AssetType assetType) : this(fileID) { if (GUID != null) { throw new ArgumentNullException(nameof(GUID)); } GUID = guid; AssetType = assetType; }
public Scene(string path, UnityGUID guid) { if (path == null) { throw new ArgumentNullException(nameof(path)); } Enabled = true; Path = path; GUID = guid; }
public AssetInfo(ISerializedFile serializedFile, long pathID, ClassIDType classID, UnityGUID guid) { if (serializedFile == null) { throw new ArgumentNullException(nameof(serializedFile)); } File = serializedFile; PathID = pathID; ClassID = classID; GUID = guid; }
public Meta(UnityGUID guid, bool hasLicense, bool isFolder, AssetImporter importer) { if (guid.IsZero) { throw new ArgumentNullException(nameof(guid)); } GUID = guid; IsFolderAsset = isFolder; HasLicenseData = hasLicense; Importer = importer ?? throw new ArgumentNullException(nameof(importer)); }
public override MetaPtr CreateExportPointer(Object asset, bool isLocal) { long exportID = GetExportID(asset); if (isLocal && IsComponent(asset)) { return(new MetaPtr(exportID)); } else { UnityGUID guid = IsComponent(asset) ? GUID : asset.GUID; return(new MetaPtr(exportID, guid, AssetType.Serialized)); } }
public MetaPtr CreateExportPointer(Object asset, bool isLocal) { if (isLocal) { throw new NotSupportedException(); } GetEngineBuildInAsset(asset, m_version, out EngineBuiltInAsset engneAsset); if (!engneAsset.IsValid) { throw new NotImplementedException($"Unknown ExportID for asset {asset.PathID} from file {asset.File.Name}"); } long exportID = engneAsset.ExportID; UnityGUID guid = engneAsset.GUID; return(new MetaPtr(exportID, guid, AssetType.Internal)); }
public MetaPtr(long fileID, UnityGUID guid, AssetType assetType) { FileID = fileID; GUID = guid; AssetType = assetType; }
public Meta(UnityGUID guid, bool hasLicense, AssetImporter importer) : this(guid, hasLicense, false, importer) { }
public Meta(UnityGUID guid, AssetImporter importer) : this(guid, true, importer) { }