public override void Read(AssetStream stream) { base.Read(stream); ParentPrefab.Read(stream); RootGameObject.Read(stream); IsPrefabParent = stream.ReadBoolean(); stream.AlignStream(AlignType.Align64); throw new NotSupportedException("Currently EditorExtension's PrefabInternal field doesn't support Engine's prefabs"); }
public override void Read(AssetReader reader) { base.Read(reader); Modification.Read(reader); SourcePrefab.Read(reader); RootGameObject.Read(reader); IsPrefabParent = reader.ReadBoolean(); reader.AlignStream(); }
public override void Read(AssetReader reader) { PrefabInstanceLayout layout = reader.Layout.PrefabInstance; if (layout.IsModificationFormat) { ReadObject(reader); if (layout.HasRootGameObject && layout.IsRootGameObjectFirst) { RootGameObject.Read(reader); } Modification.Read(reader); SourcePrefab.Read(reader); if (!layout.IsRootGameObjectFirst) { RootGameObject.Read(reader); } if (layout.HasIsPrefabAsset) { IsPrefabAsset = reader.ReadBoolean(); } if (layout.HasIsExploded) { IsExploded = reader.ReadBoolean(); } reader.AlignStream(); } else { LastMergeIdentifier.Read(reader); if (layout.HasLastTemplateIdentifier) { LastTemplateIdentifier.Read(reader); } Objects = reader.ReadAssetArray <PPtr <EditorExtension> >(); Father = reader.ReadAsset <PPtr <PrefabInstance> >(); IsDataTemplate = reader.ReadBoolean(); reader.AlignStream(); base.Read(reader); } }
public override void Read(AssetReader reader) { if (IsModificationsFormat(reader.Version)) { ReadObject(reader); bool isRootGameObjectFirst = IsRootGameObjectFirst(reader.Version); if (isRootGameObjectFirst && IsRootGameObjectRelevant(reader.Flags)) { RootGameObject.Read(reader); } Modification.Read(reader); SourcePrefab.Read(reader); if (!isRootGameObjectFirst) { RootGameObject.Read(reader); } if (IsPrefabAssetRelevant(reader.Version)) { IsPrefabAsset = reader.ReadBoolean(); } if (IsExplodedRelevant(reader.Version)) { IsExploded = reader.ReadBoolean(); } reader.AlignStream(); } else { LastMergeIdentifier.Read(reader); if (HasLastTemplateIdentifier(reader.Version)) { LastTemplateIdentifier.Read(reader); } Objects = reader.ReadAssetArray <PPtr <EditorExtension> >(); Father = reader.ReadAsset <PPtr <PrefabInstance> >(); IsDataTemplate = reader.ReadBoolean(); reader.AlignStream(); base.Read(reader); } }
public override void Read(AssetReader reader) { base.Read(reader); RootGameObject.Read(reader); }