fix: autoScaling and PositionMode may be locked

pull/289/head
mob-sakai 2023-08-18 20:30:01 +09:00
parent b9643b98ff
commit 3f2f12d2cf
1 changed files with 2 additions and 2 deletions

View File

@ -326,19 +326,19 @@ namespace Coffee.UIExtensions
void ISerializationCallbackReceiver.OnBeforeSerialize() void ISerializationCallbackReceiver.OnBeforeSerialize()
{ {
m_IgnoreCanvasScaler = !m_AutoScaling;
m_AbsoluteMode = m_PositionMode == PositionMode.Absolute;
} }
void ISerializationCallbackReceiver.OnAfterDeserialize() void ISerializationCallbackReceiver.OnAfterDeserialize()
{ {
if (m_IgnoreCanvasScaler) if (m_IgnoreCanvasScaler)
{ {
m_IgnoreCanvasScaler = false;
m_AutoScaling = false; m_AutoScaling = false;
} }
if (m_AbsoluteMode) if (m_AbsoluteMode)
{ {
m_AbsoluteMode = false;
m_PositionMode = PositionMode.Absolute; m_PositionMode = PositionMode.Absolute;
} }
} }