As described in the title, if you set a label’s scale to (0,0,0) and then set it back to something correct, it’s still showing blank squares without other modification (enable/disable for example). This is new to 3.2.0-preview1.
In the frame debugger, it says canvas renderer does not have a texture assigned. I am going to do more debugging and see what’s missing/changed.
if (m_havePropertiesChanged == false)
{
float lossyScaleY = m_rectTransform.lossyScale.y;
if (m_previousLossyScaleY != 0 && m_TextProcessingArray[0].unicode != 0)
{
float scaleDelta = lossyScaleY / m_previousLossyScale;
// Only update SDF Scale when lossy scale has changed by more than 20%
if (scaleDelta < 0.8f || scaleDelta > 1.25f)
{
UpdateSDFScale(scaleDelta);
m_previousLossyScaleY = lossyScaleY;
}
}
}
This is the current code in TMPro_UGUI_Private.cs.InternalUpdate()
if (m_havePropertiesChanged == false)
{
float lossyScaleY = m_rectTransform.lossyScale.y;
if (lossyScaleY != m_previousLossyScaleY && m_text != string.Empty && m_text != null)
{
float scaleDelta = lossyScaleY / m_previousLossyScale;
UpdateSDFScale(scaleDelta);
m_previousLossyScaleY = lossyScaleY;
}
}
And this is the code i think in version we use previously
So when m_previousLossyScaleY being set to 0, there is no way to make UpdateSDFScale called again.
if (m_havePropertiesChanged == false)
{
float lossyScaleY = m_rectTransform.lossyScale.y;
if (m_TextProcessingArray[0].unicode != 0)
{
if (m_previousLossyScaleY != 0)
{
float scaleDelta = lossyScaleY / m_previousLossyScaleY;
// Only update SDF Scale when lossy scale has changed by more than 20%
if (scaleDelta < 0.8f || scaleDelta > 1.25f)
{
UpdateSDFScale(scaleDelta);
m_previousLossyScaleY = lossyScaleY;
}
}
else if (lossyScaleY > 0)
{
UpdateSDFScale(float.PositiveInfinity);
m_previousLossyScaleY = lossyScaleY;
}
else if (lossyScaleY < 0)
{
UpdateSDFScale(float.NegativeInfinity);
m_previousLossyScaleY = lossyScaleY;
}
}
}
Fix the issue by changing it to this
swang_hothead:
if (m_havePropertiesChanged == false)
{
float lossyScaleY = m_rectTransform.lossyScale.y;
if (m_TextProcessingArray[0].unicode != 0)
{
if (m_previousLossyScaleY != 0)
{
float scaleDelta = lossyScaleY / m_previousLossyScaleY;
// Only update SDF Scale when lossy scale has changed by more than 20%
if (scaleDelta < 0.8f || scaleDelta > 1.25f)
{
UpdateSDFScale(scaleDelta);
m_previousLossyScaleY = lossyScaleY;
}
}
else if (lossyScaleY > 0)
{
UpdateSDFScale(float.PositiveInfinity);
m_previousLossyScaleY = lossyScaleY;
}
else if (lossyScaleY < 0)
{
UpdateSDFScale(float.NegativeInfinity);
m_previousLossyScaleY = lossyScaleY;
}
}
}
Fix the issue by changing it to this
Known issue that will be addressed in preview 2.
1 Like
Is there a list of known issues somewhere? And also do you have an ETA for preview 2? Great thanks!
I really like the dynamic OS feature but wasn’t too sure we can release with this preview version if it has many issues.
swang_hothead:
Is there a list of known issues somewhere? And also do you have an ETA for preview 2? Great thanks!
I really like the dynamic OS feature but wasn’t too sure we can release with this preview version if it has many issues.
This issue is kind of the only regression that has been reported. There are a few reported issues related to the Input Field but those are not specific to the new preview releases. Nothing major reported about the new features from users but a few that I caught (but nothing major).
I will try to get preview 2 released next week. I had a potential preview 2 ready to go but then decided to add support for Ligatures so that pushed it back.