Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Profiler mixes up ClassNames between main project and dependencies

Discussion in 'Testing & Automation' started by Bersaelor, May 19, 2022.

  1. Bersaelor


    Oct 8, 2016
    Hey there,

    our setup is two Unity projects (completely separated code for mobile and one for WebGL), with one shared dependency package.
    The mobile project contains a component `ImageLoader` to load UI Sprites, while the shared dependency package contains a class `MaterialsManager` that loads 3D Textures.

    Now when I profile the mobile app, it showed me performance problems in `MaterialsManager.DownloadImage` caused by the `SpriteMeshGenerator.TraceShape`. But `MaterialsManager` does not use `Sprite`, it's the `ImageLoader` that does. Both clases have a method `DownloadImage`.

    Tl;DR: If a dependency package and the main project contain different classes with similar method names, the class names get mixed up in the profiler.
    PS: 2021.3.2f1 <Metal>