public static EditNodeRow GetEditNodeRow(List <EditorBoardNodeBehavior> editNodes, float x, float y) { List <MonoBehaviour> behaviorList = new List <MonoBehaviour> (); foreach (var n in editNodes) { behaviorList.Add(n); } var row = GetBehaviorRow(behaviorList, x, y); var hidden = new List <EditorBoardNodeBehavior> (); foreach (var b in row.Hidden) { hidden.Add((EditorBoardNodeBehavior)b); } EditorBoardNodeBehavior closest = null; try { closest = (EditorBoardNodeBehavior)row.Closest; } catch (System.Exception) { } return(new EditNodeRow(closest, hidden)); }
private void OnNodeEdited(EditorBoardNodeBehavior editNode, bool delete) { if (delete) { _boardData.RemoveNode(editNode.NodeIndex); _editNodes.Remove(editNode); GameObject.DestroyImmediate(editNode.gameObject); int index = 0; for (int i = 0; i < _editNodes.Count; i++) { _editNodes [index].SetData(index, _boardData); } } HideShowNodes(); EditorUtility.SetDirty(this); }
void OnFocus() { node = (EditorBoardNodeBehavior)target; }
void OnEnable() { node = (EditorBoardNodeBehavior)target; }
public EditNodeRow(EditorBoardNodeBehavior closest, List <EditorBoardNodeBehavior> hidden) { Closest = closest; Hidden = hidden; }