Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Profiler mixes up ClassNames between main project and dependencies

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

  1. Bersaelor

    Bersaelor

    Joined:
    Oct 8, 2016
    Posts:
    110
    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>