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); }
public void Write(AssetsWriter writer) { writer.WriteCString(AssetName); writer.Write(ID); writer.Write(Type); writer.WriteCString(FileName); }
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); }
public void Write(AssetsWriter writer) { writer.Write(VertexCount); writer.WriteArrayOf(Channels, (o, w) => o.Write(w)); writer.WriteArray(Data); writer.AlignTo(4); }
public void Write(AssetsWriter writer) { Vertex.Write(writer); Normal.Write(writer); Tangent.Write(writer); writer.Write(Index); }
public void Write(AssetsWriter writer) { writer.Write(ObjectID); writer.Write(DataOffset); writer.Write(DataSize); writer.Write(TypeIndex); }
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)); }
public void Write(AssetsWriter writer) { writer.Write(Name); writer.Write(NameHash); writer.Write(FrameIndex); writer.Write(FrameCount); }
protected override void WriteBase(AssetsWriter writer) { base.WriteBase(writer); writer.Write(Enabled); MonoscriptTypePtr.Write(writer); writer.Write(Name); }
public void Write(AssetsWriter writer) { writer.Write(R); writer.Write(G); writer.Write(B); writer.Write(A); }
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); }
public void Write(AssetsWriter writer) { writer.Write(Stream); writer.Write(Offset); writer.Write(Format); writer.Write(Dimension); }
public void Write(AssetsWriter writer) { writer.Write(X); writer.Write(Y); writer.Write(Width); writer.Write(Height); }
public void Write(AssetsWriter writer) { writer.Write(X); writer.Write(Y); writer.Write(Z); writer.Write(W); }
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); }
protected override void WriteBase(AssetsWriter writer) { base.WriteBase(writer); writer.Write(Name); writer.Write(UnparsedData1); Texture.Write(writer); writer.Write(UnparsedData2); }
public void Write(AssetsWriter writer) { writer.Write(FirstVertex); writer.Write(VertexCount); writer.Write(HasNormals); writer.Write(HasTangents); writer.AlignTo(4); }
public void Write(AssetsWriter writer) { writer.Write(NumItems); writer.WriteArray(Data); writer.AlignTo(4); writer.Write(BitSize); writer.AlignTo(4); }
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); }
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]); }
protected override void WriteObject(AssetsWriter writer) { base.WriteBase(writer); AnchorMin.Write(writer); AnchorMax.Write(writer); AnchoredPosition.Write(writer); SizeDelta.Write(writer); Pivot.Write(writer); }
public void Write(AssetsWriter writer) { writer.Write(FilterMode); writer.Write(Aniso); writer.Write(MipBias); writer.Write(WrapU); writer.Write(WrapV); writer.Write(WrapW); }
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); }
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); }
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); }
public void Write(AssetsWriter writer) { writer.Write(Entries.Count()); writer.Write(StringBuffer.Length); foreach (var entry in Entries) { entry.Write(writer); } writer.WriteChars(StringBuffer); }
public int GetSize() { using (MemoryStream ms = new MemoryStream()) { using (AssetsWriter writer = new AssetsWriter(ms)) { WriteObject(writer); } return((int)ms.Length); } }
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); }
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); } }
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); }