Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

20MB scene containing only a 2.5MB prefab?

Discussion in 'Editor & General Support' started by UDN_46c91c6c-aeb1-471f-87fb-917fc1db02c9, Dec 14, 2020.

  1. UDN_46c91c6c-aeb1-471f-87fb-917fc1db02c9

    UDN_46c91c6c-aeb1-471f-87fb-917fc1db02c9

    Joined:
    Dec 3, 2017
    Posts:
    17
    This is the situation:
    Uninty2019.2.2f1

    I had a 20+MB scene that built with around 1000 instances of prefabs and very few stand alone objects that by themselves they occupied only aboput a few hundred KB.

    Most of the scene is static. No lightning, no extra stuff.

    Math doesn't add up, so I am trying to figure out where's the problem, but the scene only seems to go down in size by removing prefabs. I tried creating a new scene and copy all the data but the new scene had the same size.

    So, I get all the scene and create a prefab out of it. I save the scene and this is the result:
    Prefab with the whole scene: 2.5MB.
    Scene: 19MB

    How is it possible that a scene containing only one prefab instance of a 2.5MB prefab occupies 8 times more space than the prefab itself? Any hint?
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,738
    Edit the scene file with a text editor and see what's in it.

    There are also some things that can't be put into prefabs directly, like meshes. Typically those need to be saved to a separate asset. Hard to say if that's affecting you, without knowing more about the prefab itself.

    Anyway, provide more information. Maybe show a screenshot of your Hierarchy view in case that helps.
     
    Joe-Censored likes this.
unityunity