internal void Write(EndiannessWriter writer, UInt32 serializationVersion)
    {
        writer.WriteAlignedString(Name);

        writer.WritePPtrArray(PreloadTable, serializationVersion);
        writer.WriteInt32(Container.Length);
        foreach (var container in Container)
        {
            writer.WriteAlignedString(container.Key);
            writer.WriteAssetInfo(container.Value, serializationVersion);
        }

        writer.WriteAssetInfo(MainAsset, serializationVersion);

        writer.WriteUInt32(RuntimeCompatibility);

        writer.WriteAlignedString(AssetBundleName);
        writer.WriteInt32(DependencyAssetBundleNames.Length);
        foreach (var dependencyAssetBundleName in DependencyAssetBundleNames)
        {
            writer.WriteAlignedString(dependencyAssetBundleName);
        }

        writer.WriteBoolean(IsStreamedSceneAssetBundle);
        writer.Align(4);
        writer.WriteInt32(ExplicitDataLayout);
        writer.WriteInt32(PathFlags);

        writer.WriteInt32(SceneHashes.Count);
        foreach (var sceneHash in SceneHashes)
        {
            writer.WriteString(sceneHash.Key);
            writer.WriteString(sceneHash.Value);
        }
    }
示例#2
0
    internal void Write(EndiannessWriter writer)
    {
        writer.WriteAlignedString(Name);

        writer.WriteInt32(ForcedFallbackFormat);
        writer.WriteBoolean(DownscaleFallback);
        writer.Align(4);

        writer.WriteInt32(Width);
        writer.WriteInt32(Height);
        writer.WriteInt32(CompleteImageSize);
        writer.WriteInt32((Int32)TextureFormat);
        writer.WriteInt32(MipCount);

        writer.WriteBoolean(IsReadable);
        writer.WriteBoolean(IsReadAllowed);
        writer.Align(4);

        writer.WriteInt32(StreamingMipmapsPriority);
        writer.WriteInt32(ImageCount);
        writer.WriteInt32(TextureDimension);

        writer.WriteInt32(TextureSettings.FilterMode);
        writer.WriteInt32(TextureSettings.Aniso);
        writer.WriteSingle(TextureSettings.MipBias);
        writer.WriteInt32(TextureSettings.WrapMode);
        writer.WriteInt32(TextureSettings.WrapV);
        writer.WriteInt32(TextureSettings.WrapW);

        writer.WriteInt32(LightmapFormat);
        writer.WriteInt32(ColorSpace);
        writer.WriteInt32(ImageDataSize);

        writer.WriteUInt32(StreamData.Offset);
        writer.WriteUInt32(StreamData.Size);
        writer.WriteAlignedString(StreamData.Path);
    }