Hi,
I know it’s sounds silly, but still…
I saved my Unity scene and can’t open it anymore (
The error message is ‘serialized file size of 9.36 GB exceeds maximum’
I know the cause, it’s because EasyRoads plug-in produces new game objects for roads side objects instead of using prefabs. But it doesn’t do situation easer (
Did somebody got the same problem, is there solution to open such a large scene file?
Serialized files have a 4gb limit due to internal engine limitations. If you have a scene at 9.36GB then you will not be able to open it. You could try to hack it down in a text editor, it would be a bit of a nightmare to do. Its likely that the work in this scene is lost.
I suggest you look at converting the objects into prefabs after they have been generated or build them into asset bundles. You could also try using multiple scenes to spread the load.
We are working on improving things so that in the future we should be able to support files over 4gb however this is not currently available and is not guranteed to happen at the moment(its experimental). If you have a spare moment we would appreciate it if you could file a bug report and include the large scene file so we can test our changes against it, to see if it addresses your problems, although I suspect it will not work with files generated before our changes. You wont be able to upload it through the bug reporter tool though, we will send you details on how to upload large files when you submit the bug.
We do have errors/warnings for this. Its possible it did not print the error or it was ignored. Please file a bug report so we can investigate if an error was not produced.
Thank you for reply.
Seems like it would be easier to recreate scene from back up ( At least I have all assets saved.
Usually I’m always watching to replace all generated objects by prefabs, this time it was happened by mistake.
But I’m agreed with ** @StarManta ** and ** @ **, editor shouldn’t even save the scene, or at least to give a warning. Like a Photoshop do. I had no warning, the editor just saved scene happily and can’t open it anymore. Quite a philosophic dilemma – the being can either create a stone it cannot lift, or it cannot create a stone it cannot lift. …
Regarding RAM and hardware – I’m using custom MacPro 5.1 with NVIDIA GTX 1080Ti and 96GB of RAM on board. Pretty happy with this configuration.
Just wrote a bug report.
Regarding this “But what about the people who will be playing your game, will they have 96GB of ram ;)”
Please don’t blame me, actually I hanen’t planned to publish the game at all
In this case I used Unity to create cinematic video. Unfortunately I need a birds eye view for this scene, that’s why it became quite a large. But 10.3GB is way too mach even for this case, using prefabs cuts the size 10 times. Just forgot to replace game objects by prefabs before save the scene
jaw drops Undocumented limitations of the engine may cause a destructive non recoverable scene crash without warnings nor remediation. Um. You could just not write to the scene file if a serialized data node exceeds a certain size? Seriously, you best hope a bunch of thirsty lawyers aren’t making an indie game with Unity and stumble into this little gem, “fine print” don’t work in cases like this buddy
I see what you guys mean about it being a nightmare to try and go through a scene file with a text editor. I have the same problem, I made changes to a file, saved it not knowing it was over 4 GB (4.8) and then cannot open it. Unfortunately, my latest backup was made right after I saved it, so I didn’t realize my only backup in 2 weeks was also, essentially, corrupted/unusable, at the moment at least. Does Unity have a method yet to repair this? It’s only one root level object in the scene causing the memory problem (Voxeland), the rest of the scene minus the Voxeland object is roughly 25 MB.
I’ve tried looking at old Voxeland-only scenes I’ve saved (when I was keeping scenes separated), in a text editor (Beyond Compare is only so useful, but still useful) and it’s hard to determine what the root (and only) object in the scene is and what its specific data might be like so I can try removing the “offending” data from my current scene and NOT lose 2 weeks of work. A sure sign I need to switch to a real back-up system now that isn’t “copy entire project folder to an external drive every once in a while.”
I don’t know if this will work. I haven’t tried this myself. But can you try to change the asset serialization mode from text to binary?
Binary files are a lot smaller than text files. If unity manages to convert the big scene into a smaller binary scene, you might be able to open it, remove the content that makes it so big, and reconvert it to text format.
The big question here is: Can unity convert a text scene that is +4Gb…
Thanks NuclearC00kie and Peter77! I will try the binary serialization approach first, and if that doesn’t work, it’s “backup and try Unity 2020.1” time!
I agree with above posters that Unity should NOT even attempt to save a file over its own loading limit hint hint Unity devs But in all actuality, I really appreciate all the hard work that Unity’s folks put into making this amazing tool, problems, bugs and errors or not! Keep up the amazing work guys! I’ve watched Unity change a lot since 2012!!!
OMG face palm You’d think a 23 year programmer would be smarter… I set Unity’s asset serialization mode to Binary and tried to reload the project. Somehow the scene file went from 4.8 GB to 9 KB and still won’t load… AND I didn’t make a backup before I even did that!!! WHY!!! dramatic scene with rain pouring down on face as I look into the sky
Just note to all others that read this and haven’t learned: For God’s sake, make a backup annoyingly often. You might just thank yourself one day…
Also, shameless plug, this is the project I was/am working on: The Skinwalker Investigations.
I had a scene file that exceeded 4GB and managed to fix it.
At first I thought I could simply scan through the scenefile and remove a few huge elements, but no. When the scene was imported with these missing, the hierarchy was all messed up.
But removing data from inside an object worked!
What I did was first scan the file, using a filestream, and finding “— !u!” which indicates the start of an object in the scene, like gameobject, meshfilter etc…
Then I parsed to the next, and the next… To get a list of all objects, their position in the scenefile and their sizes.
Then I chose the biggest meshes and found the mesh’s indices in “m_IndexBuffer” (I think), and simply edited all the values out.
Everything is now showing as it was in the hierarchy in the scene, (even those big meshes, possibly because they were points), but Unity is complaining: “DrawBuffers() got a range of indices but no index buffer”.
I added my script here, rip it a part as much as you need… Its not, you know… nice.
I did not include my debug class, so that at least needs to be edited.