GithubHelp home page GithubHelp logo

Comments (13)

thanwah avatar thanwah commented on June 9, 2024 1

Unity doesn't make much use of traditional Android resources, but automatically targeting Sprite Atlases based on the device screen size or density is an interesting thought! We have been working on targeting assets based on device attributes, but I'm not sure whether Sprite Atlases came up yet.

It looks like it might be possible to automatically create Variant Sprite Atlases with a scale factor that corresponds to a particular screen size and/or density.

I'll bring this up with a team member who has been working on device-specific asset targeting. Thank you for filing the feature request!

from play-unity-plugins.

paulohgodinho avatar paulohgodinho commented on June 9, 2024

I believe you can pack your atlases in multiple Asset Bundles and download the correct ones from google CDN based on the screen pixel density.

from play-unity-plugins.

binouze avatar binouze commented on June 9, 2024

Yes sure but it would be good to have the same option as iOS app slicing for android too. Without the need of downloading assets at first game launch.

from play-unity-plugins.

binouze avatar binouze commented on June 9, 2024

Would be very nice :)

from play-unity-plugins.

binouze avatar binouze commented on June 9, 2024

After reading the code of AssetDelivery plugin, I see that there is a naming convention for texture compression format targeting is there a naming convention for device screen density ?

At the moment I use assets delivery on demand with 4 AssetBundle (just containing SpriteAtlas) (hd_astc, sd_astc, hd_etc2, sd_etc2) and at first game launch I get the right bundle for the target screen size and support of texture.

The first launch is the most important for our users and I would like it to be fast, not let the user wait while downloading assets. Having a split on texture support and screen size would be a must.

About "automatically create Variant Sprite Atlases", personally I prefer keep control on sprite atlas variants and for all our projects at the moment 2 size variants are really enough.

An other problem, it seems that there is a problem with SpriteAtlas variants packed in AssetBundle, I just posted on unity forum about it here : https://forum.unity.com/threads/spriteatlas-variant-in-assetbundle-references-master-spriteatlas-as-dependency.875350/

from play-unity-plugins.

thanwah avatar thanwah commented on June 9, 2024

We don't have a naming convention yet for device screen density or size.

@4ian and I have started talking about this feature request, but we don't have any updates yet.

Please keep us in the loop on your Unity forum question since it seems like that may be a blocker for the approach to work.

Thanks!

from play-unity-plugins.

binouze avatar binouze commented on June 9, 2024

No response to my question on the forum. I filled a bug report this morning and I'm waiting for an update on this.

from play-unity-plugins.

binouze avatar binouze commented on June 9, 2024

Hi,

I managed to don't have the master SpriteAtlas packed in the AssetBundle containing the variant SpriteAtlas when the master SpriteAtlas is not in any AssetBundle, just unchecked the "include in build" tick in the SpriteAtlas.

But the dependency is still there in the dependencies list of the AssetBundles manifests when the master SpriteAtlas is packed in an AssetBundle.

In your system, does the dependencies are automatically loaded alongside the demanded resource ?

from play-unity-plugins.

thanwah avatar thanwah commented on June 9, 2024

Thanks for following up!

We check AssetBundle dependencies and display them in the settings UI, however we don't enforce that AssetBundle dependencies are satisfied when downloading asset packs. (One reason we don't enforce dependencies is that Unity allows circular dependencies among AssetBundles.)

In your case, if the AssetBundle containing the variant SpriteAtlas depends on the AssetBundle containing the master SpriteAtlas, this should be fine, unless the variant SpriteAtlas asset itself requires the master SpriteAtlas asset to be loaded. (I'm not sure if this is the case, but you should be able to test out loading your variant SpriteAtlas to check.)

from play-unity-plugins.

binouze avatar binouze commented on June 9, 2024

I already tested and the variant sprite atlas is working even if the master is not loaded.
It would be weird to have to load the master atlas to be able to use the variant ;)

from play-unity-plugins.

binouze avatar binouze commented on June 9, 2024

Hi,
I'm currently using asset delivery for different texture format (#tcf_default and #tcf_astc) but I still need 2 different AAB with manifest tweaking to support HD / SD versions. There is no more issues with SpriteAtlas variants in AssetsBundles and the texture format delivery works great.
Would be good to add the screen density splitting support ;)

from play-unity-plugins.

binouze avatar binouze commented on June 9, 2024

Hi there,
Any update on screen density / size splitting support ?

from play-unity-plugins.

lvgrecords avatar lvgrecords commented on June 9, 2024

Hi there,
Any update on screen density / size splitting support ?

from play-unity-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.