Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Scrollview, Scroller and Foldout crash Android build

Discussion in 'UI Toolkit' started by nevadza, Jan 5, 2021.

  1. nevadza

    nevadza

    Joined:
    Sep 29, 2016
    Posts:
    5
    Hello,

    I'm trying to build a sample UI to replace UI of already published project on Play and App Store. So I need to be sure there won't be any surprises and it is worth to start the rework :)

    I have an issue with Scrollview, Scroller, Foldout. I did not test all other components yet but (I guess) issue lies in a fact these components use images from UI Toolkit. When I build and deploy to Huawei P8 (Android 6) I get:

    Autoconnected Player 'R32G32B32A32_SFloat' is not supported. RenderTexture::GetTemporary fallbacks to None format on this platform. Use 'SystemInfo.IsFormatSupported' C# API to check format support.



    Autoconnected Player Texture creation failed. 'None' is not supported for Render usage on this platform. Use 'SystemInfo.IsFormatSupported' C# API to check format support.



    Autoconnected Player NullReferenceException: Object reference not set to an instance of an object.


    Build for iOS 14.0 runs fine. Is there anything I can do to make it work on Android? Currently my minimum API level for Android is 4.4.

    PS: I tried to override bg image with USS but it did not help

    Thank you
     
  2. nevadza

    nevadza

    Joined:
    Sep 29, 2016
    Posts:
    5
    Just to add, if I remove these components and keep only Button and Label UI renders fine on Android device.
     
  3. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,028
    Thanks for reporting. It seems we are trying to use a float32 texture on a platform that doesn't support it. Can you provide more details on the particular device your are using?
     
  4. nevadza

    nevadza

    Joined:
    Sep 29, 2016
    Posts:
    5
    Device is: HUAWEI GRA-L09 with EMUI 4.0.3 and Android 6.0
    Unity: 2020.2.1f1
    UI Toolkit: 1.0.0-preview.13
    UI Builder: 1.0.0-preview.11
     
  5. nevadza

    nevadza

    Joined:
    Sep 29, 2016
    Posts:
    5
    Might help....

    01-06 10:11:15.454 12178 12194 W Unity : 'R32G32B32A32_SFloat' is not supported. RenderTexture::GetTemporary fallbacks to None format on this platform. Use 'SystemInfo.IsFormatSupported' C# API to check format support.
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.RenderTexture:GetCompatibleFormat(RenderTextureFormat, RenderTextureReadWrite)
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.RenderTexture:.ctor(Int32, Int32, Int32, RenderTextureFormat)
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.DynamicAtlasCore:CreateAtlasTexture()
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.DynamicAtlasCore:UpdateAtlasTexture()
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.DynamicAtlasCore:Commit()
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.UIR.RenderChain:processChanges()
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.UIRRepaintUpdater:Update()
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase(VisualTreeUpdatePhase)
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.Panel:Repaint(Event)
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.BaseRuntimePanel:Repaint(Event)
    01-06 10:11:15.454 12178 12194 W Unity : UnityEngine.UIElements.UIElementsRuntimeUtility:RepaintOverlayPanels()
    01-06 10:11:15.454 12178 12194 W Unity : System.Action:Invoke()
    01-06 10:11:15.454 12178 12194 W Unity :
    01-06 10:11:15.454 12178 12194 W Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    01-06 10:11:15.454 12178 12194 W Unity :
    01-06 10:11:15.456 12178 12194 E Unity : Texture creation failed. 'None' is not supported for Render usage on this platform. Use 'SystemInfo.IsFormatSupported' C# API to check format support.
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.Texture:ValidateFormat(GraphicsFormat, FormatUsage)
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.RenderTexture:.ctor(Int32, Int32, Int32, GraphicsFormat)
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.DynamicAtlasCore:CreateAtlasTexture()
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.DynamicAtlasCore:UpdateAtlasTexture()
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.DynamicAtlasCore:Commit()
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.UIR.RenderChain:processChanges()
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.UIRRepaintUpdater:Update()
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase(VisualTreeUpdatePhase)
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.Panel:Repaint(Event)
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.BaseRuntimePanel:Repaint(Event)
    01-06 10:11:15.456 12178 12194 E Unity : UnityEngine.UIElements.UIElementsRuntimeUtility:RepaintOverlayPanels()
    01-06 10:11:15.456 12178 12194 E Unity : System.Action:Invoke()
    01-06 10:11:15.456 12178 12194 E Unity :
    01-06 10:11:15.456 12178 12194 E Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    01-06 10:11:15.456 12178 12194 E Unity :
    01-06 10:11:15.484 12178 12194 E Unity : NullReferenceException: Object reference not set to an instance of an object.
    01-06 10:11:15.484 12178 12194 E Unity : at UnityEngine.UIElements.DynamicAtlasCore.CreateAtlasTexture () [0x00000] in <00000000000000000000000000000000>:0
    01-06 10:11:15.484 12178 12194 E Unity : at UnityEngine.UIElements.DynamicAtlasCore.UpdateAtlasTexture () [0x00000] in <00000000000000000000000000000000>:0
    01-06 10:11:15.484 12178 12194 E Unity : at UnityEngine.UIElements.DynamicAtlasCore.Commit () [0x00000] in <00000000000000000000000000000000>:0
    01-06 10:11:15.484 12178 12194 E Unity : at UnityEngine.UIElements.UIR.RenderChain.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0
    01-06 10:11:15.484 12178 12194 E Unity : at UnityEngine.UIElements.UIRRepaintUpdater.Update () [0x00000] in <00000000000000000000000000000000>:0
    01-06 10:11:15.484 12178 12194 E Unity : at UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) [0x00000] in <00000000000000000000000000000000>:0
    01-06 10:11:15.484 12178 12194 E Unity : at UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) [0x00000] in <00000000000000000000000000000000>:0
    01-06 10:11:15.484 12178 12194 E Unity : at UnityEngine.UIElements.BaseRuntimePanel.Repaint (UnityEngine.Event e) [0x00000] in <0000000
     
  6. nevadza

    nevadza

    Joined:
    Sep 29, 2016
    Posts:
    5
    Hello @mcoted3d, do you have any estimate when this could be fixed? In current state it can't be used for Android mobile projects. I'd like to draft my migration roadmap, thank you.
     
  7. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    1,028
    No ETA yet, but your callstack seems to show device limitations that we should be avoiding.
    I couldn't get my hands on a device with similar limitations. Trying to fix this will be a shot in the dark.
    I would suggest you file an official bug report (Help > Report a Bug...) and post the issue number here so I can track it. The QA team will be able to help me to reproduce it.
     
  8. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    389
    It looks like we made a mistake by assuming RGBA float render targets would be available on your device, but GLES 3.1 is only required to support RGBA float textures. We have another code path for lower-end devices though. If you don't have another device available, try building for GLES 2.0 only. We'll fix the issue (please create a report nonetheless as martin recommended, so we can track this more easily).
     
  9. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    389