fix: autoScaling and PositionMode may be locked
parent
b9643b98ff
commit
3f2f12d2cf
Scripts
|
@ -326,19 +326,19 @@ namespace Coffee.UIExtensions
|
|||
|
||||
void ISerializationCallbackReceiver.OnBeforeSerialize()
|
||||
{
|
||||
m_IgnoreCanvasScaler = !m_AutoScaling;
|
||||
m_AbsoluteMode = m_PositionMode == PositionMode.Absolute;
|
||||
}
|
||||
|
||||
void ISerializationCallbackReceiver.OnAfterDeserialize()
|
||||
{
|
||||
if (m_IgnoreCanvasScaler)
|
||||
{
|
||||
m_IgnoreCanvasScaler = false;
|
||||
m_AutoScaling = false;
|
||||
}
|
||||
|
||||
if (m_AbsoluteMode)
|
||||
{
|
||||
m_AbsoluteMode = false;
|
||||
m_PositionMode = PositionMode.Absolute;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue