Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
135 stars 2 forks source link

TextUnlitMaterial AutoBackgroundColor not recalculated when re-enabled #1431

Open XDelta opened 7 months ago

XDelta commented 7 months ago

Describe the bug?

Disabling the AutoBackgroundColor bool on TextUnlitMaterial and re-enabling appears to not change it back and appears to remain as if it was not enabled.

To Reproduce

Spawn some text and open up the TextUnlitMaterial on it Disable AutoBackgroundColor Enable AutoBackgroundColor Observe text is stuck as if the setting was still off

Expected behavior

Text to return to original state.

Screenshots

a706d49230

Resonite Version Number

2024.3.1.1178

What Platforms does this occur on?

Windows

Log Files

No errors/exceptions are logged for this.

Additional Context

This does appear to recalculate and display correctly upon saving the world and re-opening it.

Reporters

_deltawolf

shiftyscales commented 7 months ago

Confirmed thanks. I'm not actually sure what this functionality is supposed to do? It just seems to ignore any changes made to the background colour at all while it is enabled- but I'm not sure what the 'expected' result is supposed to look like.

SHIFTY-LAPTOP - 2024.3.1.1178 - 2024-03-04 12_03_39.log

https://github.com/Yellow-Dog-Man/Resonite-Issues/assets/54213390/74fc5a29-5ffd-4fef-89d5-f4ba480d9d17

Seeking input from @Geenz, @ProbablePrime, or @Frooxius.

XDelta commented 7 months ago

I've narrowed the issue down further. It'll 'fix' itself when changing the TintColor or OutlineColor as the UpdateMaterial() method looks to skip running the AutoBackgroundColor code path when it is true if neither of those properties were changed.

Just enabling AutoBackgroundColor does not trigger running that path once to set the color of BackgroundColor.