NetworkInformationPreview code cleanup (changes if to method call with ?: (#204)

This commit is contained in:
MichalPetryka 2018-12-31 22:42:03 +01:00 committed by Paul Pacheco
parent 81d98015b7
commit 86a11f4761

View File

@ -141,14 +141,8 @@ public override void OnPreviewGUI(Rect r, GUIStyle background)
// could be the case in the editor after existing play mode.
continue;
}
if (info.behaviour.enabled)
{
GUI.Label(behaviourRect, info.name, m_Styles.componentName);
}
else
{
GUI.Label(behaviourRect, info.name, m_Styles.disabledName);
}
GUI.Label(behaviourRect, info.name, info.behaviour.enabled ? m_Styles.componentName : m_Styles.disabledName);
behaviourRect.y += behaviourRect.height;
lastY = behaviourRect.y;
}
@ -277,4 +271,4 @@ static NetworkIdentityInfo GetBoolean(string name, bool value)
return info;
}
}
}
}