当前位置: 首页>>代码示例>>C#>>正文


C# IUnrealStream.Write方法代码示例

本文整理汇总了C#中IUnrealStream.Write方法的典型用法代码示例。如果您正苦于以下问题:C# IUnrealStream.Write方法的具体用法?C# IUnrealStream.Write怎么用?C# IUnrealStream.Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IUnrealStream的用法示例。


在下文中一共展示了IUnrealStream.Write方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Serialize

 public void Serialize( IUnrealStream stream )
 {
     Console.WriteLine( "Writing import " + ObjectName + " at " + stream.Position );
     stream.Write( PackageName );
     stream.Write( _ClassName );
     stream.Write( OuterTable != null ? (int)OuterTable.Object : 0 ); // Always an ordinary integer
     stream.Write( ObjectName );
 }
开发者ID:jjbott,项目名称:Unreal-Library,代码行数:8,代码来源:UImportTableItem.cs

示例2: Serialize

 public void Serialize( IUnrealStream stream )
 {
     // TODO: Implement code
     stream.Write( UncompressedOffset );
     stream.Write( UncompressedSize );
     stream.Write( CompressedOffset );
     stream.Write( CompressedSize );
 }
开发者ID:jjbott,项目名称:Unreal-Library,代码行数:8,代码来源:UnrealPackageCompression.cs

示例3: Serialize

 public void Serialize( IUnrealStream stream )
 {
     stream.Write( ExportsCount );
     stream.Write( NamesCount );
     if( stream.Version >= VNetObjectsCount )
     {
         stream.Write( NetObjectsCount );
     }
 }
开发者ID:jjbott,项目名称:Unreal-Library,代码行数:9,代码来源:UGenerationTableItem.cs

示例4: Serialize

 public void Serialize( IUnrealStream stream )
 {
     stream.WriteIndex( _Index );
     if( stream.Version >= VNameNumbered )
     {
         Console.WriteLine( _Number + " " + _Text );
         stream.Write( (uint)_Number + 1 );
     }
 }
开发者ID:jjbott,项目名称:Unreal-Library,代码行数:9,代码来源:UName.cs

示例5: Serialize

        //public Dictionary<int, int> Components;
        //public List<int> NetObjects;
        #endregion

        // @Warning - Only supports Official builds.
        public void Serialize( IUnrealStream stream )
        {
            stream.Write( ClassTable.Object );
            stream.Write( SuperTable.Object );
            stream.Write( (int)OuterTable.Object );

            stream.Write( ObjectName );

            if( stream.Version >= VArchetype )
            {
                ArchetypeIndex = stream.ReadInt32();
            }
            stream.UW.Write( stream.Version >= VObjectFlagsToULONG ? ObjectFlags : (uint)ObjectFlags );
            stream.WriteIndex( SerialSize );    // Assumes SerialSize has been updated to @Object's buffer size.
            if( SerialSize > 0 || stream.Version >= VSerialSizeConditionless )
            {
                // SerialOffset has to be set and written after this object has been serialized.
                stream.WriteIndex( SerialOffset );  // Assumes the same as @SerialSize comment.
            }

            // TODO: Continue.
        }
开发者ID:jjbott,项目名称:Unreal-Library,代码行数:27,代码来源:UExportTableItem.cs

示例6: Serialize

            public void Serialize( IUnrealStream stream )
            {
                stream.Write( NamesCount );
                stream.Write( NamesOffset );

                stream.Write( ExportsCount );
                stream.Write( ExportsOffset );

                stream.Write( ImportsCount );
                stream.Write( ImportsOffset );

                if( stream.Version < 415 )
                    return;

                // DependsOffset
                stream.Write( DependsOffset );
            }
开发者ID:EliotVU,项目名称:Unreal-Library,代码行数:17,代码来源:UnrealPackage.cs

示例7: Serialize

        public void Serialize( IUnrealStream stream )
        {
            // Serialize tables
            var namesBuffer = new UObjectStream( stream );
            foreach( var name in Names )
            {
                name.Serialize( namesBuffer );
            }

            var importsBuffer = new UObjectStream( stream );
            foreach( var import in Imports )
            {
                import.Serialize( importsBuffer );
            }

            var exportsBuffer = new UObjectStream( stream );
            foreach( var export in Exports )
            {
                //export.Serialize( exportsBuffer );
            }

            stream.Seek( 0, SeekOrigin.Begin );

            stream.Write( Signature );

            // Serialize header
            var version = (int)(Version & 0x0000FFFFU) | (LicenseeVersion << 16);
            stream.Write( version );

            var headerSizePosition = stream.Position;
            if( Version >= VHeaderSize )
            {
                stream.Write( (int)HeaderSize );
                if( Version >= VGroup )
                {
                    stream.WriteString( Group );
                }
            }

            stream.Write( PackageFlags );

            _TablesData.NamesCount = (uint)Names.Count;
            _TablesData.ExportsCount = (uint)Exports.Count;
            _TablesData.ImportsCount = (uint)Imports.Count;

            var tablesDataPosition = stream.Position;
            _TablesData.Serialize( stream );

            // TODO: Serialize Heritages

            stream.Write( Guid.NewGuid().ToByteArray(), 0, 16 );
            Generations.Serialize( stream );

            if( Version >= VEngineVersion )
            {
                stream.Write( EngineVersion );
                if( Version >= VCOOKEDPACKAGES )
                {
                    stream.Write( CookerVersion );

                    if( Version >= VCompression )
                    {
                        if( IsCooked() )
                        {
                            stream.Write( CompressionFlags );
                            CompressedChunks.Serialize( stream );
                        }
                    }
                }
            }

            // TODO: Unknown data
            stream.Write( (uint)0 );

            // Serialize objects

            // Write tables

            // names
            Console.WriteLine( "Writing names at position " + stream.Position );
            _TablesData.NamesOffset = (uint)stream.Position;
            var namesBytes = namesBuffer.GetBuffer();
            stream.Write( namesBytes, 0, (int)namesBuffer.Length );

            // imports
            Console.WriteLine( "Writing imports at position " + stream.Position );
            _TablesData.ImportsOffset = (uint)stream.Position;
            var importsBytes = importsBuffer.GetBuffer();
            stream.Write( importsBytes, 0, (int)importsBuffer.Length );

            // exports
            Console.WriteLine( "Writing exports at position " + stream.Position );

            // Serialize tables data again now that offsets are known.
            var currentPosition = stream.Position;
            stream.Seek( tablesDataPosition, SeekOrigin.Begin );
            _TablesData.Serialize( stream );
            stream.Seek( currentPosition, SeekOrigin.Begin );
        }
开发者ID:jjbott,项目名称:Unreal-Library,代码行数:99,代码来源:UnrealPackage.cs


注:本文中的IUnrealStream.Write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。