Search Issue Tracker

By Design

Votes

2

Found in [Package]

2.3.16

Issue ID

ADDR-3893

Regression

No

UI Images without Sprites become invisible when loaded additively within a Scene using Addressables

Package: Addressables

-

How to reproduce:
1. Open the attached "IN-89298" project
2. Open the “BagatelleBoard1” Scene and enter Play mode
3. Observe the “BagatelleScoreBar” UI object, taking note of the color and transparency of its child objects
4. Open the "Lobby" Scene and enter Play mode
5. Click and drag the cursor to the left inside the Game window to make the player character move right and load into the next Scene
6. Repeat step 3

Expected result: GameObject with Image component set to a solid color remains visible
Actual result: GameObject turns invisible

Reproducible in: 2.2.2 (6000.0.39f1, 6000.1.0b7, 6000.2.0a4), 2.3.16 (6000.0.39f1, 6000.1.0b7, 6000.2.0a4)
Could not test with: 1.23.1 (2022.3.58f1) (Project uses Awaitable class for crucial processes, which is available starting Unity 6 and onward)

Reproducible on: Windows 10, Windows 11
Not reproducible on: No other environments tested

Note: Project breaks when using macOS 15.3 (M1), entering Play mode results in the Game window being greyed out and multiple errors appearing inside the console window, could not fully test

  1. Resolution Note:

    Thank you for reporting this issue. We have thoroughly investigated the project and identified the root cause of the problem.

    Issue Analysis: Our investigation has determined that this issue originates from within the project's codebase rather than the Unity engine itself.

    Technical Details: The problem stems from the MetaballPanel.cs file, specifically where the metaball material's main texture is being updated with a CustomRenderTexture using the following line:

    `material.mainTexture = _mateballTexture`

    Root Cause: The material being modified is the UI Default material, which is shared and reused by other UI elements, including the scoreboard background rendering. This material expects to utilize the default white texture, which appears to be getting overridden and subsequently recolored to black, causing the reported visual issue.

    Recommended Solutions: We have verified that commenting out the problematic line in MetaballPanel resolves the issue. To implement a permanent fix, we recommend one of the following approaches:

    1. Create a dedicated material instance specifically for the MetaballPanel functionality to avoid conflicts with shared UI materials
    2. Implement proper cleanup by reverting to the default white texture when unloading the Lobby scene
    These solutions will prevent the modification of shared materials and ensure proper UI rendering across all scenes.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.