No announcement yet.

Difference between "launch" and "package"?

  • Filter
  • Time
  • Show
Clear All
new posts

    Difference between "launch" and "package"?

    I have set my project to build ETC1, ATC, and ASTC textures. (ASTC compression is ... not fast.)

    It's a simple game, with a 3D scene, and a bit of UI that actually drives the game.

    When I "launch" to my Android device, the game plays fine (except for one problem, where it asserts and dies if I have a physically simulated box, because it tries to re-calculate the navmesh for it -- that's not what this post is for.)

    The apk it builds when I "launch" is 37 MB in size.

    When I "package" the project, the build takes several hours (see ASTC above...)
    But, more curiously, the apk it builds is 220 mebabytes in size!
    I have checked "include all content in apk" because the game is really quite small, and avoiding an obb will be useful.

    Also, when I install and run that packaged project, the UI displays fine, but the 3D scene behind it is all black. The same scene that renders just fine when I "launch."

    Two questions about this:

    - What accounts for the large size difference between "launch" apk and "package" apk? What should I watch out for here?

    - How come a project that renders fine in "launch" mode can render all black in "package" mode? What should I watch out for here?

    Hi jwatte,

    Package will build a final APK and optional OBB which will include all your content. This is what you want for distributing or submitting to the store since it is self-contained.

    Launch will only cook and copy content to the device for the currently loaded map. It will not package it into the APK or an OBB, or even into PAK files. It will copy the files loose to the device into the /sdcard/UE4Game/[Project] directory along with manifest files giving the timestamps. When you launch again it will compare the manifest file timestamps against the cooked content and only push the changes needed (along with new manifest files). This is the iterative deploy step to help with iteration times. The APK will include minimal content when created for launch which is why it is smaller.

    As for the render all black in package, it could be caused by not setting the startup map in project settings; launch always uses the currently loaded map.


      Thanks for the hints! I think I have set the startup map correctly. It's my one and only map, too.

      It may be that I have scrap content around that I'm not using -- does the cooker include everything that's not actively excluded, or does it start at the given map(s) and only pull in things that are actually referenced?


        Double-checking, you called it -- I had updated the Editor default map to be my one-and-only map, but not the Game default map. My mistake!

        After pruning all assets that weren't referenced by the scene, and baking only ETC1 textures (no ATC or ASTC,) my project apk is a svelte 67 MB. Thanks for the description about the difference between "launch" and "package" -- very helpful!

        Btw: when pruning assets, I'd run into the problem that texture X is referenced by material Y is referenced by particle system Z -- which isn't used in the scene. So, I'd have to start at the highest level (blueprints, particle systems, etc) and start deleting unreferenced assets, so that I could then feel confident in deleting lower-level assets like meshes, sounds, and textures.
        There's got to be some smarts that could be applied that tells me which assets are NOT used by the level/s I built? (I know there is smarts that can tell me what IS used -- just run that, and invert the selection :-)