Unexpected file loading problems

Hello everyone
I’m using pixyz plugin to load .NWD models but unity crashes or i have to shut it down manually.
There are my measurements in table. When I do import with prefab creation (standard way) on 20mb file it never reached end. Ram is getting to 25gb (which seems to be limit) in short time and then it goes full rampage on disc.

My Spec:
Ram:32gb
Proc: intel i9-13900HX
Graphics: RTX4090
Unity: 2022.3.39f1
System: Windows
I did some stress tests on computer and benchmarks are fine

to import those file I use this import into scene

My questions are:

  1. with import in scene it says “This is legacy method… assets are not serialized properly”
    are there any reasons that I shouldn’t use this method? what means that assets are not serialized properly? can I use this method reliably on production?
  2. What is causing those enormous import issues even on 20 mb file?
    Why is it allocating so much ram that disc has to be utilized?
    is it that number of gamobjects is high and each of those has metadata?

Thanks in advance

Edit: File extenstion is NWD

Hey there,

Assets (meshes, materials, textures…) imported with the “import in scene” method are serialized in your scene and not in your Assets database. It means that you can only use them there and they are difficult to manage. They can be found in the “Scene” tab of the asset selector when selecting this type of assets:

Once imported and the scene saved it is totally safe to use them (inside the scene). But do not reference these assets from another prefab that could be used in another scene.

Regarding the RAM issues we’ll definitely look into it. We are aware that prefab serialization is taking too much memory and time (hence the alternative “import in scene” method).

Hey Marcanz
Thanks for your replay.
Thanks for info about those:)

I made more research and it seems that issue is mainly with NWD and NWC files.
You can see that RVT files of similar size are loaded instantly when NWD files take minutes to load even with few megabytes

I hope that it’ll be useful for you

If I can ask few more questions.

  1. So even though NWD files are small those models are not since they are heavy compressed, and creation time is long because of huge hierarchies?

So depending of file formats file size is not a very good metric.

Some files for examples contains NURBS, described by parametric functions that does not take a lot of space on disk but will in memory and processing time because we will need to discretize them (generating triangles out of these mathematical representations; the name of this process is called tessellation). More info in the doc.

Also, since you are importing with “poor quality” we will also process meshes by repairing and decimating them which will take processing time and memory. The more meshes in your file the more time/memory it will take.

To answer your last question: creation time is mostly bounded by the number of meshes that will be created, not necessarily by hierarchies or metadata.

Thank you Marcanz that answers all of my questions :slight_smile:

2 Likes