예제 #1
0
        public void WriteTo(Stream stream)
        {
            BinaryWriter writer = new BinaryWriter(stream);

            writer.Write(m_Component.Count);
            for (int i = 0; i < m_Component.Count; i++)
            {
                writer.Write((int)m_Component[i].Key);
                m_Component[i].Value.WriteTo(stream);
            }

            writer.Write(m_Layer);
            writer.WriteNameA4(m_Name);
            writer.Write(m_Tag);
            writer.Write(m_isActive);
        }
예제 #2
0
파일: Mesh.cs 프로젝트: hejob/SB3Utility
        public void WriteTo(Stream stream)
        {
            BinaryWriter writer = new BinaryWriter(stream);
            writer.WriteNameA4(m_Name);

            writer.Write(m_SubMeshes.Count);
            for (int i = 0; i < m_SubMeshes.Count; i++)
            {
                m_SubMeshes[i].WriteTo(stream);
            }

            m_Shapes.WriteTo(stream);

            writer.Write(m_BindPose.Count);
            for (int i = 0; i < m_BindPose.Count; i++)
            {
                writer.Write(m_BindPose[i]);
            }

            writer.Write(m_BoneNameHashes.Count);
            for (int i = 0; i < m_BoneNameHashes.Count; i++)
            {
                writer.Write(m_BoneNameHashes[i]);
            }

            writer.Write(m_RootBoneNameHash);
            writer.Write(m_MeshCompression);
            writer.Write(m_StreamCompression);
            writer.Write(m_IsReadable);
            writer.Write(m_KeepVertices);
            writer.Write(m_KeepIndices);
            writer.BaseStream.Position += 3;

            writer.Write(m_IndexBuffer.Length);
            writer.Write(m_IndexBuffer);
            if ((m_IndexBuffer.Length & 3) > 0)
            {
                writer.BaseStream.Position += 4 - (m_IndexBuffer.Length & 3);
            }

            writer.Write(m_Skin.Count);
            for (int i = 0; i < m_Skin.Count; i++)
            {
                m_Skin[i].WriteTo(stream);
            }

            m_VertexData.WriteTo(stream);
            m_CompressedMesh.WriteTo(stream);
            m_LocalAABB.WriteTo(stream);
            writer.Write(m_MeshUsageFlags);
        }
예제 #3
0
파일: Mesh.cs 프로젝트: hejob/SB3Utility
 public void WriteTo(Stream stream)
 {
     BinaryWriter writer = new BinaryWriter(stream);
     writer.WriteNameA4(name);
     writer.Write(nameHash);
     writer.Write(frameIndex);
     writer.Write(frameCount);
 }
예제 #4
0
        public void WriteTo(Stream stream)
        {
            BinaryWriter writer = new BinaryWriter(stream);
            writer.WriteNameA4(m_Name);
            writer.Write(m_ControllerSize);
            m_Controller.WriteTo(stream);

            writer.Write(m_TOS.Count);
            for (int i = 0; i < m_TOS.Count; i++)
            {
                writer.Write(m_TOS[i].Key);
                writer.WriteNameA4(m_TOS[i].Value);
            }

            writer.Write(m_AnimationClips.Count);
            for (int i = 0; i < m_AnimationClips.Count; i++)
            {
                m_AnimationClips[i].WriteTo(stream);
            }
        }
예제 #5
0
        public void WriteTo(Stream stream)
        {
            BinaryWriter writer = new BinaryWriter(stream);
            writer.WriteNameA4(m_Name);
            writer.Write(m_Format);
            writer.Write(m_Type);
            writer.Write(m_3D);
            writer.Write(m_UseHardware);
            writer.Write(new byte[2]);
            writer.Write(m_Stream);

            writer.Write(m_AudioData.Length);
            writer.Write(m_AudioData);
        }
예제 #6
0
        public void WriteTo(Stream stream)
        {
            UpdateComponents();

            BinaryWriter writer = new BinaryWriter(stream);
            writer.WriteNameA4(m_Name);

            writer.Write(m_PreloadTable.Count);
            for (int i = 0; i < m_PreloadTable.Count; i++)
            {
                m_PreloadTable[i].WriteTo(stream);
            }

            writer.Write(m_Container.Count);
            for (int i = 0; i < m_Container.Count; i++)
            {
                writer.WriteNameA4(m_Container[i].Key);
                m_Container[i].Value.WriteTo(stream);
            }

            m_MainAsset.WriteTo(stream);

            writer.Write(m_ScriptCompatibility.Length);
            for (int i = 0; i < m_ScriptCompatibility.Length; i++)
            {
                m_ScriptCompatibility[i].WriteTo(stream);
            }

            writer.Write(m_ClassCompatibility.Length);
            for (int i = 0; i < m_ClassCompatibility.Length; i++)
            {
                writer.Write(m_ClassCompatibility[i].Key);
                writer.Write(m_ClassCompatibility[i].Value);
            }

            writer.Write(m_RuntimeCompatibility);
        }
예제 #7
0
 public void WriteTo(Stream stream)
 {
     BinaryWriter writer = new BinaryWriter(stream);
     writer.WriteNameA4(className);
     writer.WriteNameA4(nameSpace);
     writer.WriteNameA4(assemblyName);
     writer.Write(hash);
 }
예제 #8
0
        public void WriteTo(Stream stream)
        {
            BinaryWriter writer = new BinaryWriter(stream);
            writer.WriteNameA4(m_Name);
            m_Shader.WriteTo(stream);

            writer.Write(m_ShaderKeywords.Count);
            for (int i = 0; i < m_ShaderKeywords.Count; i++)
            {
                writer.WriteNameA4(m_ShaderKeywords[i]);
            }

            writer.Write(m_CustomRenderQueue);
            m_SavedProperties.WriteTo(stream);
        }
예제 #9
0
 public void WriteTo(Stream stream)
 {
     BinaryWriter writer = new BinaryWriter(stream);
     writer.WriteNameA4(name);
 }
예제 #10
0
파일: Sprite.cs 프로젝트: hejob/SB3Utility
 public void WriteTo(Stream stream)
 {
     BinaryWriter writer = new BinaryWriter(stream);
     writer.WriteNameA4(m_Name);
     m_Rect.WriteTo(stream);
     writer.Write(m_Offset);
     writer.Write(m_Border);
     writer.Write(m_PixelsToUnits);
     writer.Write(m_Extrude);
     m_RD.WriteTo(stream);
 }
예제 #11
0
 public void WriteTo(Stream stream)
 {
     BinaryWriter writer = new BinaryWriter(stream);
     writer.WriteNameA4(m_Name);
     writer.Write(m_Width);
     writer.Write(m_Height);
     writer.Write(m_CompleteImageSize);
     writer.Write((int)m_TextureFormat);
     writer.Write(m_MipMap);
     writer.Write(m_isReadable);
     writer.Write(m_ReadAllowed);
     writer.Write((byte)0);
     writer.Write(m_ImageCount);
     writer.Write(m_TextureDimension);
     m_TextureSettings.WriteTo(stream);
     writer.Write(m_LightmapFormat);
     writer.Write(m_ColorSpace);
     writer.Write(image_data.Length);
     writer.Write(image_data);
     writer.Write(new byte[4 - image_data.Length & 3]);
 }
예제 #12
0
파일: Shader.cs 프로젝트: hejob/SB3Utility
        public void WriteTo(Stream stream)
        {
            BinaryWriter writer = new BinaryWriter(stream);
            writer.WriteNameA4(m_Name);
            writer.WriteNameA4(m_Script);
            writer.WriteNameA4(m_PathName);

            writer.Write(m_Dependencies.Count);
            for (int i = 0; i < m_Dependencies.Count; i++)
            {
                m_Dependencies[i].WriteTo(stream);
            }

            writer.Write(m_ShaderIsBaked);
            writer.Write(new byte[3]);
        }
예제 #13
0
파일: Avatar.cs 프로젝트: hejob/SB3Utility
        public void WriteTo(Stream stream)
        {
            BinaryWriter writer = new BinaryWriter(stream);
            writer.WriteNameA4(m_Name);
            writer.Write(m_AvatarSize);
            m_Avatar.WriteTo(stream);

            writer.Write(m_TOS.Count);
            for (int i = 0; i < m_TOS.Count; i++)
            {
                writer.Write(m_TOS[i].Key);
                writer.WriteNameA4(m_TOS[i].Value);
            }
        }
예제 #14
0
 public void WriteTo(Stream stream)
 {
     BinaryWriter writer = new BinaryWriter(stream);
     writer.WriteNameA4(m_Name);
     writer.Write(m_ExecutionOrder);
     writer.Write(m_PropertiesHash);
     writer.WriteNameA4(m_ClassName);
     writer.WriteNameA4(m_Namespace);
     writer.WriteNameA4(m_AssemblyName);
     writer.Write(m_IsEditorScript);
 }