Table of Contents

Interface IContentSerializer

Namespace
Stride.Core.Serialization.Contents
Assembly
Stride.Core.Serialization.dll

Serializer for high-level "chunk", used by ContentManager.

public interface IContentSerializer

Properties

ActualType

Gets the actual runtime type of object being serialized by Serialize(ContentSerializerContext, SerializationStream, object). It could be different than SerializationType if a conversion happened.

Type ActualType { get; }

Property Value

Type

The actual type.

SerializationType

Gets the type stored on HDD. Usually matches ActualType, but sometimes it might be converted to a different format (i.e. a GPU Texture is saved as an Image).

Type SerializationType { get; }

Property Value

Type

The type stored on HDD.

Methods

Construct(ContentSerializerContext)

Constructs the specified object. This is useful if there is any cycle in the object graph reference.

object Construct(ContentSerializerContext context)

Parameters

context ContentSerializerContext

The context.

Returns

object

The newly built object.

Serialize(ContentSerializerContext, SerializationStream, object)

Serializes the specified object.

void Serialize(ContentSerializerContext context, SerializationStream stream, object obj)

Parameters

context ContentSerializerContext

The context.

stream SerializationStream

The stream.

obj object

The object.