Jump to content

Imported InternalSpace configs bloats Unity scene filesize


Recommended Posts

While working on various add-on packs with a mixture of parts, internals and props in Unity 4.5.2f / PartTools 0.23, I've noticed something peculiar.

- Each of my add-on authoring projects have been compartmentalized into their own Unity scene file (e.g. FusTek Station Parts.unity, SDHI Service Module), so that I can just see/work on the parts/props relevant to my current project.

- Taking my FusTek project for example, I have:

  • 23 GameObjects / PartTools scripts for part external models
  • 6 GameObjects / PartTools scripts for internal cabin base models
  • 19 GameObjects / PartTools scripts for internal props

- Thanks to Blender prefabs and texture-sharing, my Unity scene file for FusTek is merely 1.04 MB for all of the above.

- I've successfully created and edited InternalSpaces as well (i.e. CFG that lists what props an internal uses), so I'm reasonably familiar with that too.

- What I've noticed, however, is that importing even a single InternalSpace config into my scene file increases its filesize greatly, and causes Unity to become extremely sluggish. For example:

  • Importing ALCORInternals3 (ALCOR pod internal) adds ~260 MB, with most props sharing from a handful of texture atlases
  • Importing PodCockpit (stock KSP Mk1-2 pod internal) adds ~80 MB, with most props having their own unique textures
  • Importing B9_Cockpit_S2_Internal (B9 Aerospace pack S2 cockpit internal) adds ~95 MB
  • Importing K3_S2_Extended (K3_chris's B9 S2 cockpit revamp) adds ~100 MB
  • Importing Internal_KupolaObsModule (FusTek Kupola internal) adds ~15 MB
  • Importing Internal_KuestAirlock (FusTek Kuest Airlock internal) adds ~130 MB, despite the fact that all of the props share the same texture atlas
  • Importing Internal_KarmonyHabModule (FusTek Karmony Habitation module internal) adds a whopping ~1.08 GB, despite the fact that all of the props share the same texture atlas

Has anyone else observed this in their own Unity projects?

Link to comment
Share on other sites

  • 1 month later...
Tis because the models n textures imported via the plugin are stored in the scene file itself.

Ah, thanks for the explanation.

Are there any alternative methods possible? The current setup is a bit of a show-stopper, since this means for every Internal configuration I want to edit, I would have to import, make my changes, write the config and delete the Internal GameObject before saving to keep file sizes manageable.

Link to comment
Share on other sites

  • 4 weeks later...

Okay, now that my InternalSpaces are getting more props, the current asset loading system is becoming increasingly problematic - specifically, because PartTools loads duplicates of textures and stores them directly in the scene file, my editor often crashes due to running out of memory

My current workaround is to:

- Temporarily remove the prop textures from GameData

- Have the InternalSpace script load just the models (which are less memory and file size intensive)

- Make my changes (e.g. add / edit / remove props)

- Re-export the InternalSpace config

- Close the editor without saving

- Move the prop textures back into GameData

However, I would really appreciate a rework of the PropTools asset loading system.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...