/// <summary> /// Draws the list of event listeners. /// </summary> private void DrawEventListeners() { EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); EditorGUILayout.LabelField("Listeners", SOFlowStyles.BoldCenterLabel); GUILayout.FlexibleSpace(); EditorGUILayout.LabelField($"Size: {_target.Listeners.Count}", SOFlowStyles.WordWrappedMiniLabel); EditorGUILayout.EndHorizontal(); SOFlowEditorUtilities.DrawScrollViewColourLayer(SOFlowEditorSettings.SecondaryLayerColour, ref _listenersScrollPosition, () => { for (int index = 0; index < _target.Listeners.Count; index++) { IEventListener listener = _target.Listeners[index]; SOFlowEditorUtilities .DrawHorizontalColourLayer(SOFlowEditorSettings.TertiaryLayerColour, () => { EditorGUILayout .LabelField($"{index} | {listener.GetObjectType().Name}"); EditorGUILayout .ObjectField(listener.GetGameObject(), typeof (GameObject ), true); }); } }, GUILayout.MaxHeight(_scrollHeight)); }