Project Development log: Build Assetbundle--spriteatlas (still some doubts)

Source: Internet
Author: User

Project Information:
   Platform-Android Unity Editor Version-2018.2.5f1
Scenario 1: The display of the UI referenced by the sprite under the atlas in the real machine is incorrect.

The following two solutions were found under our tests:

1. Before loading the corresponding UI, load the spriteAtlas to the memory in advance. (It is quite troublesome, you have to know which atlas your sprite belongs to, and you need a corresponding set of resource loading frameworks).

 2. Call the callback provided by Unity, and manually locate and load the corresponding atlas. (Untiy2018 will provide coroutines for asynchronously loading atlases)

Here's why I wonder:
 Test record: unity2017.3.0f3 SpriteAtlas for AB package: UnityEditor, check Include in Build, do not register atlasRequested, load UI prefab with Image, display UnityEditor normally, uncheck Include in Build, do not register atlasRequested, load with Image UI prefab does not display and warns SpriteAtlasManager.atlasRequested wasn't listened to while RGB requested. UnityEditor, check Include in Build, register atlasRequested, load UI prefab with Image, display normally, but do not trigger the atlasRequested event . UnityEditor, uncheck Include in Build, register atlasRequested, load UI prefab with Image, display normally, and trigger atlasRequested event. Android real machine, check Include in Build, do not register atlasRequested, load UI prefab with Image, display Android real machine, uncheck Include in Build, do not register atlasRequested, load UI preform with Image, display normally Pictures (strange) Android real machine, check Include in Build, register atlasRequested, do not load UI prefab with Image, display pictures normally, do not trigger atlasRequested event. Android real machine, do not check Include in Build, register atlasRequested, do not load UI prefab with Image, display pictures normally, but do not trigger the atlasRequested event (strange) Our project Unity2018 has a large number of UI (checked Include in Build) Sometimes a display error occurs, and it returns to normal after the registration event. So here is a bug of Unity?

 Reference page: https://www.litefeel.com/blog/unity-2017-new-sprite-atlas/#comment-28099
Project development log: Build AssetBundle-SpriteAtlas (still a little confused)


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.