Search Unity

Canvas Scaler, AssetBundles and screen resolution

Discussion in '2D' started by tomerpeledNG, Oct 15, 2017.

  1. tomerpeledNG

    tomerpeledNG

    Joined:
    Jul 14, 2017
    Posts:
    81
    I want to build my mobile game so that it will best fit all the mobile resolutions as well as lower the build size and memory according to the specific screen resolution.

    I thought of using the following way:

    1. Work with AssetBundles and serve the relevant AssetBundle variants according to the screen resolution (Basically I wanted to support HD + QHD different assets)
    2. Work with the CanvasScaler so that it will scale down when needed
    3. The init build will probably need to include the relevant screen resolutions asset bundles in it (under the StreamingAssets folder)- so this means that I'll have different builds for different resolutions.
    Few issues with this approach:

    • I think that 1 + 2 collides, because if I set the CanvasScaler to some resolution - then replacing the assets in runtime (using the asset bundles) will cause the CanvasScaler to also scale down the assets loaded which are already scaled down.
    • Can we create different builds for different resolutions? in the same App Store/Google Play...
    • Creating high/low assets can cause a maintenance overhead - can I create the lower resolution automatically via code maybe?
    What will be the best approach to support different screen resolution as well to maintain lower build and memory size?
     
  2. MurcsRoyce

    MurcsRoyce

    Joined:
    Jul 19, 2017
    Posts:
    38
    I recommend downloading the android developer software. It will teach you a ton on mobile development. Even if your going to use unity to create your game. And i would recomend this to anyone wanting to develope mobile apps or games. Its a must.