コード例 #1
0
 protected override void WriteObject(AssetsWriter writer)
 {
     base.WriteBase(writer);
     writer.Write(Name);
     writer.Write(ForcedFallbackFormat);
     writer.Write(DownscaleFallback);
     writer.AlignTo(4);
     writer.Write(Width);
     writer.Write(Height);
     writer.Write(CompleteImageSize);
     writer.Write((int)TextureFormat);
     writer.Write(MipCount);
     writer.Write(IsReadable);
     writer.Write(StreamingMipmaps);
     writer.AlignTo(4);
     writer.Write(StreamingMipmapsPriority);
     writer.Write(ImageCount);
     writer.Write(TextureDimension);
     TextureSettings.Write(writer);
     writer.Write(LightmapFormat);
     writer.Write(ColorSpace);
     writer.Write(ImageData.Length);
     writer.Write(ImageData);
     writer.AlignTo(4);
     StreamData.Write(writer);
 }
コード例 #2
0
 public void Write(AssetsWriter writer)
 {
     writer.WriteCString(AssetName);
     writer.Write(ID);
     writer.Write(Type);
     writer.WriteCString(FileName);
 }
コード例 #3
0
 protected override void WriteObject(AssetsWriter writer)
 {
     base.WriteBase(writer);
     writer.Write(Name);
     //writer.Write(MeshData);
     writer.WriteArrayOf(SubMeshes, (o, w) => o.Write(w));
     BlendShapeData.Write(writer);
     writer.WriteArrayOf(BindPose, (o, w) => w.Write(o));
     writer.WriteArrayOf(BoneNameHashes, (o, w) => w.Write(o));
     writer.Write(RootBoneNameHash);
     writer.Write(MeshCompression);
     writer.Write(IsReadable);
     writer.Write(KeepVerticies);
     writer.Write(KeepIndicies);
     writer.AlignTo(4);
     writer.Write(IndexFormat);
     writer.WriteArray(IndexBuffer);
     writer.AlignTo(4);
     VertexData.Write(writer);
     CompressedMesh.Write(writer);
     LocalAABB.Write(writer);
     writer.Write(MeshUsageFlags);
     writer.WriteArray(BakedConvexCollisionMesh);
     writer.AlignTo(4);
     writer.WriteArray(BakedTriangleCollisionMesh);
     writer.AlignTo(4);
     writer.Write(MeshMetrics1);
     writer.Write(MeshMetrics2);
     StreamData.Write(writer);
 }
コード例 #4
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(VertexCount);
     writer.WriteArrayOf(Channels, (o, w) => o.Write(w));
     writer.WriteArray(Data);
     writer.AlignTo(4);
 }
コード例 #5
0
 public void Write(AssetsWriter writer)
 {
     Vertex.Write(writer);
     Normal.Write(writer);
     Tangent.Write(writer);
     writer.Write(Index);
 }
コード例 #6
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(ObjectID);
     writer.Write(DataOffset);
     writer.Write(DataSize);
     writer.Write(TypeIndex);
 }
コード例 #7
0
 public void Write(AssetsWriter writer)
 {
     writer.WriteArrayOf(Verticies, (o, w) => o.Write(w));
     writer.WriteArrayOf(Shapes, (o, w) => o.Write(w));
     writer.WriteArrayOf(Channels, (o, w) => o.Write(w));
     writer.WriteArrayOf(FullWeights, (o, w) => w.Write(o));
 }
コード例 #8
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(Name);
     writer.Write(NameHash);
     writer.Write(FrameIndex);
     writer.Write(FrameCount);
 }
コード例 #9
0
 protected override void WriteBase(AssetsWriter writer)
 {
     base.WriteBase(writer);
     writer.Write(Enabled);
     MonoscriptTypePtr.Write(writer);
     writer.Write(Name);
 }
コード例 #10
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(R);
     writer.Write(G);
     writer.Write(B);
     writer.Write(A);
 }
コード例 #11
0
 protected override void WriteObject(AssetsWriter writer)
 {
     base.WriteBase(writer);
     writer.Write(IsEnabled);
     writer.Write(CastShadows);
     writer.Write(ReceiveShadows);
     writer.Write(DynamicOcclude);
     writer.Write(MotionVectors);
     writer.Write(LightProbeUsage);
     writer.Write(ReflectionProbeUsage);
     writer.AlignTo(4);
     writer.Write(RenderingLayerMask);
     if (ObjectInfo.ParentFile.Metadata.VersionGte("2018.3"))
     {
         writer.Write(RendererPriority);
     }
     writer.Write(LightmapIndex);
     writer.Write(LightmapIndexDynamic);
     LightmapTilingOffset.Write(writer);
     LightmapTilingOffsetDynamic.Write(writer);
     writer.WriteArrayOf(Materials, (o, w) => o.Write(w));
     StaticBatchInfo.Write(writer);
     StaticBatchRoot.Write(writer);
     ProbeAnchor.Write(writer);
     LightProbeVolumeOverride.Write(writer);
     writer.Write(SortingLayerID);
     writer.Write(SortingLayer);
     writer.Write(SortingOrder);
     AdditionalVertexStreams.Write(writer);
 }
コード例 #12
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(Stream);
     writer.Write(Offset);
     writer.Write(Format);
     writer.Write(Dimension);
 }
コード例 #13
0
ファイル: RectF.cs プロジェクト: mdmayfield/QuestomAssets
 public void Write(AssetsWriter writer)
 {
     writer.Write(X);
     writer.Write(Y);
     writer.Write(Width);
     writer.Write(Height);
 }
コード例 #14
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(X);
     writer.Write(Y);
     writer.Write(Z);
     writer.Write(W);
 }
コード例 #15
0
        public IObjectInfo <T> Clone()
        {
            T newObj = null;

            using (var ms = new MemoryStream())
            {
                ObjectInfo <T> newInfo = (ObjectInfo <T>) ObjectInfo <T> .FromTypeIndex(ParentFile, TypeIndex, null);

                newInfo.DataOffset = 0;
                newInfo.ObjectID   = 0;
                using (var writer = new AssetsWriter(ms))
                {
                    Object.Write(writer);
                }
                newInfo.DataSize = (int)ms.Length;
                ms.Seek(0, SeekOrigin.Begin);
                using (var reader = new AssetsReader(ms))
                {
                    newObj = (T)Activator.CreateInstance(typeof(T), newInfo, reader);
                }
                newInfo.DataOffset = -1;
                newInfo.DataSize   = -1;
                newInfo._object    = newObj;
            }
            return((IObjectInfo <T>)newObj.ObjectInfo);
        }
コード例 #16
0
 protected override void WriteBase(AssetsWriter writer)
 {
     base.WriteBase(writer);
     writer.Write(Name);
     writer.Write(UnparsedData1);
     Texture.Write(writer);
     writer.Write(UnparsedData2);
 }
コード例 #17
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(FirstVertex);
     writer.Write(VertexCount);
     writer.Write(HasNormals);
     writer.Write(HasTangents);
     writer.AlignTo(4);
 }
コード例 #18
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(NumItems);
     writer.WriteArray(Data);
     writer.AlignTo(4);
     writer.Write(BitSize);
     writer.AlignTo(4);
 }
コード例 #19
0
ファイル: Transform.cs プロジェクト: mdmayfield/QuestomAssets
 protected override void WriteObject(AssetsWriter writer)
 {
     base.WriteBase(writer);
     LocalRotation.Write(writer);
     LocalPosition.Write(writer);
     LocalScale.Write(writer);
     writer.WriteArrayOf(Children, (x, y) => x.Write(y));
     Father.Write(writer);
 }
コード例 #20
0
 public void Write(AssetsWriter writer)
 {
     writer.WriteBEInt32(MetadataSize);
     writer.WriteBEInt32(FileSize);
     writer.WriteBEInt32(Version);
     writer.WriteBEInt32(ObjectDataOffset);
     writer.Write(IsBigEndian);
     writer.Write(new byte[3]);
 }
コード例 #21
0
 protected override void WriteObject(AssetsWriter writer)
 {
     base.WriteBase(writer);
     AnchorMin.Write(writer);
     AnchorMax.Write(writer);
     AnchoredPosition.Write(writer);
     SizeDelta.Write(writer);
     Pivot.Write(writer);
 }
コード例 #22
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(FilterMode);
     writer.Write(Aniso);
     writer.Write(MipBias);
     writer.Write(WrapU);
     writer.Write(WrapV);
     writer.Write(WrapW);
 }
コード例 #23
0
ファイル: Transform.cs プロジェクト: ivannpaz/QuestStopgap
 public override void Write(AssetsWriter writer)
 {
     base.WriteBase(writer);
     LocalRotation.Write(writer);
     LocalPosition.Write(writer);
     LocalScale.Write(writer);
     writer.WriteArrayOf(Children, x => x.WritePtr(writer));
     Father.WritePtr(writer);
 }
コード例 #24
0
ファイル: SubMesh.cs プロジェクト: mdmayfield/QuestomAssets
 public void Write(AssetsWriter writer)
 {
     writer.Write(FirstByte);
     writer.Write(IndexCount);
     writer.Write(Topology);
     writer.Write(BaseVertex);
     writer.Write(FirstVertex);
     writer.Write(VertexCount);
     LocalAABB.Write(writer);
 }
コード例 #25
0
 protected override void WriteBase(AssetsWriter writer)
 {
     base.WriteBase(writer);
     writer.Write(Name);
     writer.Write(ExecutionOrder);
     writer.Write(PropertiesHash);
     writer.Write(ClassName);
     writer.Write(Namespace);
     writer.Write(AssemblyName);
 }
コード例 #26
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(Entries.Count());
     writer.Write(StringBuffer.Length);
     foreach (var entry in Entries)
     {
         entry.Write(writer);
     }
     writer.WriteChars(StringBuffer);
 }
コード例 #27
0
 public int GetSize()
 {
     using (MemoryStream ms = new MemoryStream())
     {
         using (AssetsWriter writer = new AssetsWriter(ms))
         {
             WriteObject(writer);
         }
         return((int)ms.Length);
     }
 }
コード例 #28
0
 public void Write(AssetsWriter writer)
 {
     writer.Write(Version);
     writer.Write(Depth);
     writer.Write(IsArray);
     writer.Write(TypeOffset);
     writer.Write(NameOffset);
     writer.Write(Size);
     writer.Write(Index);
     writer.Write(Flags);
 }
コード例 #29
0
ファイル: Extensions.cs プロジェクト: Assistant/QuestStopgap
 public static void Write <T>(this ISmartPtr <T> ptr, AssetsWriter writer) where T : AssetsObject
 {
     if (ptr == null)
     {
         writer.Write((Int32)0);
         writer.Write((Int64)0);
     }
     else
     {
         ptr.WritePtr(writer);
     }
 }
コード例 #30
0
ファイル: GameObject.cs プロジェクト: ivannpaz/QuestStopgap
 protected override void WriteBase(AssetsWriter writer)
 {
     base.WriteBase(writer);
     writer.Write(Components.Count);
     foreach (var c in Components)
     {
         c.Write(writer);
     }
     writer.Write(Layer);
     writer.Write(Name);
     writer.Write(Tag);
     writer.Write(IsActive);
 }