New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContentWriter bugged... #6661
Comments
|
Hi! I'm a first time contributor and I'd like to take a stab at fixing this if it's still a problem! |
I don't think this issue is still relevant. This behavior is inherited from |
That doesn't sound right @mrhelmut. The MonoGame/MonoGame.Framework.Content.Pipeline/Serialization/Compiler/ContentWriter.cs Line 123 in 72919dc
Compare with // Clears all buffers for this writer and causes any buffered data to be
// written to the underlying device.
public virtual void Flush()
{
OutStream.Flush();
} The thing to figure out here is when we do need to write the stuff we now write in |
From the sounds of it, and from what I've seen, the current Flush call is working to finalize the file after the main body of content has been written, instead of only writing out the remaining data in the buffer. It seems as though this can either be slotted elsewhere in the ContentWriter class where it makes more sense or contained in its own method. What would be best given the current architecture? |
whenever I get the "ContentWriter.BaseStream" pointer, then the ContentWriter adding again and again the header in the file. Why ContentWrite write something in the file, i only get basestream.position?
If i do something like below:
My file will have "8" XNB header files.
my workaround if i need 'basestream.position' just make first MemoryStream, and later everything copy by Write(memstream.ToArray());
http://oi65.tinypic.com/2gx1eer.jpg
What version of MonoGame does the bug occur on:
What operating system are you using:
What MonoGame platform are you using:
The text was updated successfully, but these errors were encountered: