public PCFFile(IFileHandle path, bool memStream, PCFfileType fileType = PCFfileType.Unknown) { this.memStream = memStream; this.path = path; this.fileType = fileType; this.blockData = new Dictionary <PCFResourceType, DataBlockBase>(); //This must exist in order for pcf file to work properly. this.indexBlock = new IndexBlock(); }
private byte[] fileType; //UINT32. public FileHeader(int version, int length, PCFfileType type) { this.version = BitConverter.GetBytes(version); this.length = BitConverter.GetBytes(length); this.fileType = BitConverter.GetBytes((int)type); }
protected void SerializeContent(GameObject go, object[] serializeOptions, string outputDirectory, string outputPath, PCFfileType contentFileType) { AssetSerializer serializedObject = new AssetSerializer(go, outputDirectory); Dictionary <PCFResourceType, DataBlockBase> dataBlocks = serializedObject.Serialize(serializeOptions); IFileHandle fileHandle = new NormalFileHandle(outputPath); PCFFile file = new PCFFile(fileHandle, false, contentFileType); file.AddDataBlocks(dataBlocks); file.SaveFile(); }