void DrawVector2ElementFilter() { using (new EditorGUILayout.HorizontalScope()) { EditorGUILayout.LabelField(s_SendVec2ElementsContent); EditorGUILayout.PropertyField(m_SendVector2ElementsProp, k_EmptyContent); } var enumValueIndex = (Vector2ElementFilter)m_SendVector2ElementsProp.enumValueIndex; if (enumValueIndex != Vector2ElementFilter.XY) { if (enumValueIndex != m_PreviousVec2FilterEnumValue) { var propName = m_PropertyNames[m_PropertyIndex]; var filterStr = $"{propName}.{enumValueIndex.ToString().ToLower()}"; switch (enumValueIndex) { case Vector2ElementFilter.X: case Vector2ElementFilter.Y: m_FilterHelpLabel = $"sending {filterStr} as a float"; break; } } EditorHelp.DrawBox(m_FilterHelpLabel); } m_PreviousVec2FilterEnumValue = enumValueIndex; }
public override void OnInspectorGUI() { serializedObject.Update(); EditorGUILayout.PropertyField(m_IpAddressProp); EditorGUILayout.PropertyField(m_PortProp); EditorGUILayout.Space(); EditorHelp.DrawBox(k_HelpText); serializedObject.ApplyModifiedProperties(); }