Ejemplo n.º 1
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

#if UNIVERSAL
            if (HasCorrespondingSourceObject(reader.Flags))
            {
                CorrespondingSourceObject.Read(reader);
                PrefabInstance.Read(reader);
            }
            if (HasPrefabAsset(reader.Version, reader.Flags))
            {
                PrefabAsset.Read(reader);
            }
#endif
        }
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

#if UNIVERSAL
            EditorExtensionLayout layout = reader.Layout.EditorExtension;
            if (layout.HasExtensionPtr)
            {
                ExtensionPtr = reader.ReadAsset <PPtr <Object> >();
            }
            if (layout.HasCorrespondingSourceObject)
            {
                CorrespondingSourceObject.Read(reader);
                PrefabInstance.Read(reader);
            }
            if (layout.HasPrefabAsset)
            {
                PrefabAsset.Read(reader);
            }
#endif
        }
Ejemplo n.º 3
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

#if UNIVERSAL
            if (HasEditorPtrs(reader.Flags))
            {
                if (HasCorrespondingSourceObject(reader.Version, reader.Flags))
                {
                    CorrespondingSourceObject.Read(reader);
                    PrefabInstance.Read(reader);
                }
                else
                {
                    ExtensionPtr = reader.ReadAsset <PPtr <Object> >();
                }
                if (HasPrefabAsset(reader.Version, reader.Flags))
                {
                    PrefabAsset.Read(reader);
                }
            }
#endif
        }