コード例 #1
0
        public override void SaveAsset(BinaryWriter writer)
        {
            base.SaveAsset(writer);
            int i;

            writer.Write(FileScale);
            writer.Write(SerializeBlock.GetBytes(Pivot));
            writer.Write(Vertices.Length);
            for (i = 0; i < Vertices.Length; i++)
            {
                byte[] bytes = SerializeBlock.GetBytes(Vertices[i]);
                writer.Write(bytes);
            }
            writer.Write(Indexes.Length);
            for (i = 0; i < Indexes.Length; i++)
            {
                writer.Write(Indexes[i]);
            }
            writer.Write(SerializeBlock.GetBytes(BoundingMinimum));
            writer.Write(SerializeBlock.GetBytes(BoundingMaximum));
            if (subAssets == null)
            {
                return;
            }
            foreach (MeshAsset subAsset in subAssets)
            {
                AssetsManagerInstance.GetManager().FSWorker.CreateAssetFile(subAsset, true);
            }
        }
コード例 #2
0
 public override void SaveAsset(BinaryWriter writer)
 {
     base.SaveAsset(writer);
     writer.Write(SerializeBlock.GetBytes(AlbedoColor));
     writer.Write(AlphaValue);
     writer.Write(RoughnessValue);
     writer.Write(MetallicValue);
     writer.Write(SerializeBlock.GetBytes(Tile));
     writer.Write(SerializeBlock.GetBytes(Shift));
     writer.Write(AlbedoMapAsset);
     writer.Write(NormalMapAsset);
     writer.Write(RoughnessMapAsset);
     writer.Write(MetallicMapAsset);
     writer.Write(OcclusionMapAsset);
 }