コード例 #1
0
ファイル: Prefab.cs プロジェクト: SeaniaTwix/UtinyRipper
        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");
        }
コード例 #2
0
ファイル: Prefab.cs プロジェクト: l2xin/UtinyRipper
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Modification.Read(reader);
            SourcePrefab.Read(reader);
            RootGameObject.Read(reader);
            IsPrefabParent = reader.ReadBoolean();
            reader.AlignStream();
        }
コード例 #3
0
ファイル: PrefabInstance.cs プロジェクト: wyfleb/UtinyRipper
        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);
            }
        }
コード例 #4
0
ファイル: PrefabInstance.cs プロジェクト: lego13/UtinyRipper
        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);
            }
        }
コード例 #5
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            RootGameObject.Read(reader);
        }